Part Number Hot Search : 
130N03 E4C0517S MBRF3010 IRFF321 640431 Q4004LT BZX84C47 TLCW5100
Product Description
Full Text Search
 

To Download MC1231A Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 Advanced Brushless Motor Control Chipset
Features Supports 3-phase as well as 2-phase brushless motors Performs trajectory generation, servo loop closure, and commutation Ultra-smooth sinusoidal commutation Open or closed loop operation Software and feature-compatible with other 1st generation PMD chipsets Available in 1 or 2 axis configurations 32-bit position, velocity, acceleration and jerk trajectory profile registers Choice of S-curve, trapezoidal, or contoured velocity profile modes Electronic Gearing Two travel-limit switches per axis Choice of PWM or DAC motor output signals Easy-to-use packet-oriented command protocol Commutation Waveforms
3-Phase Brushless
Phase A Phase B Phase C
MC1231A MC1131A
General Description
The MC1231A is a dedicated motion processor which functions as a complete chip-based motor controller. Packaged in a 2-IC chipset, this device performs trajectory generation, servo loop closure, and sinusoidal commutation. The chipset inputs incremental encoder signals and outputs PWM or DAC-compatible motor command signals. The MC1231A is available in a one, or a two-axis configuration. The MC1231A is functionally similar to other members of PMD's 1st generation chipset family however it adds the ability to perform sinusoidal commutation of brushless motors. All of these devices provide sophisticated motion control capabilities allowing the creation of complex profile sequences with very low tracking errors. Both two and three-phase brushless motors are supported by the MC1231A. When used with two-phase brushless motors each phase is separated by 90 degrees. When used with 3-phase brushless motors each phase is separated by 120 degress. The commutation angle is continuously calculated using the encoder position. User-programmable commutation parameters allow a very wide range of encoders and motors to be controlled. The chipset is controlled by a host processor which interfaces with the chipset via an 8-bit, bi-directional port. Communications to/from the chipset consist of packet-oriented messages. The chipset is packaged in 2 68-pin PLCC packages. Both chips utilize CMOS technology and are powered by 5 volts.
2-Phase Brushless
Phase A Phase B
Doc. Rev. 10.05, Nov 1997
Performance Motion Devices, Inc. 12 Waltham St. Lexington, MA 02421 tel: 781.674.9860 fax: 781.674.9861 www.pmdcorp.com
Table of Contents
Product Family Overview....................................... Page 3 Introduction........................................................... Page 3 Family Summary................................................... Page 3 Electrical Characteristics....................................... Page 4 Absolute Maximum Ratings.................................. Page 4 Operating Ratings................................................. Page 4 DC Electrical Characteristics ................................ Page 5 AC Electrical Characteristics ................................ Page 5 I/O Timing Diagrams............................................. Page 7 Pinouts .................................................................... Page 12 MC1231A, MC1131A............................................ Page 12 Pin Descriptions.................................................... Page 13 Theory of Operations ............................................. Page 17 Operational Parameters ....................................... Page 18 Trajectory Profile Generation................................ Page 18 S-curve Point to Point....................................... Page 19 Trapezoidal Point to Point................................. Page 20 Velocity Contouring........................................... Page 20 Electronic Gear................................................. Page 21 Trajectory Control ................................................. Page 21 Halting the Trajectory ....................................... Page 21 Motion Complete Status ................................... Page 22 Digital Servo Filtering ........................................... Page 22 Motor Bias ........................................................ Page 23 Motor Limit........................................................ Page 23 Parameter Loading & Updating ............................ Page 23 Manual Update ................................................. Page 24 Breakpoints....................................................... Page 24 External Breakpoints and Homing .................... page 25 Disabling Automatic Profile Update .................. Page 25 Travel Limit Switches............................................ Page 25 Motion Error Detection.......................................... Page 26 Recovering From a Motion Error ...................... Page 26 Servo Loop Control & Timing ............................... Page 26 Host Communications .......................................... Page 27 Electrical Interface ............................................ Page 27 Packet Format .................................................. Page 27 Packet Checksum............................................. Page 28 Illegal Commands............................................. Page 28 Command Errors .............................................. Page 28 Axis Addressing................................................ Page 29 Axis Status............................................................ Page 29 Status Word...................................................... Page 29 Miscellaneous Mode Status Word.....................Page 29 Host Interrupts.......................................................Page 30 Encoder Position Feedback ..................................Page 31 Encoder FIltering...............................................Page 31 High Speed Position Capture............................Page 31 Index Pulses and Commutation ........................Page 31 Motor Outputs .......................................................Page 31 Motor Output Control.........................................Page 32 Sinusoidal Commutation .......................................Page 31 Commutation Waveforms..................................Page 33 Commutation Parameters .................................Page 33 Index Pulse Referencing ...................................Page 33 Commutation Error Detection............................Page 34 Phase Initialization ............................................Page 34 Phase Initialization Programming......................Page 35 Adjusting The Commutation Angle....................Page 36 Encoder Pre-Scalar...........................................Page 37 Velocity-Based Phase Advance ........................Page 37 Phase Info Status Word ....................................Page 37 Commutation Command Summary...................Page 38 Motor Output Configuration...............................Page 38 Motor Output Signal Interpretation ....................Page 38 DAC16 Decoding...............................................Page 39 PWM Decoding .................................................Page 39 Host Commands .....................................................Page 40 Command Summary .............................................Page 40 Command Reference ............................................Page 42 Axis Control.......................................................Page 42 Profile Generation .............................................Page 43 Digital Filter .......................................................Page 46 Parameter Update.............................................Page 49 Interrupt Processing ..........................................Page 51 Status/Mode ......................................................Page 52 Encoder.............................................................Page 53 Motor .................................................................Page 54 Miscellaneous ...................................................Page 55 Commutation.....................................................Page 57 Application Notes ...................................................Page 62 Interfacing to ISA bus............................................Page 62 PWM Motor Interface ............................................Page 64 16-Bit Parallel DAC Motor interface ......................Page 66
Performance Motion Devices, Inc. does not assume any responsibility for use of any circuitry described in this manual, nor does it make any guarantee as to the accuracy of this manual. Performance Motion Devices, Inc. reserves the right to change the circuitry described in this manual, or the manual itself, at any time. The components described in this manual are not authorized for use in life-support systems without the express written permission of Performance Motion Devices, Inc..
2
Product Family Overview
# of axes Motors Supported Encoder Format Output Format S-curve profiling Electronic gearing On-the-fly changes Limit switches PID & feedforward PWM output DAC-compatible output Pulse & direction output Index & Home signal Chipset p/n's MC1401 series 4, 2, or 1 DC Servo Incremental (no dash version) and Parallel ('-P' version) DC servo MC1231 series 2 or 1 Brushless Servo Incremental Sinusoidally commutated Yes Yes Yes Yes Yes Yes Yes Yes MC1231A (2 axes) MC1131A (1 axis) DK1231A MC1241 series 2 or 1 Stepper Incremental Microstepping Yes Yes Yes Yes Yes Yes Yes MC1241A (2 axes) MC1141A (1 axis) DK1241A MC1451 series 4, 2, or 1 Stepper Incremental* Pulse and Direction Yes Yes Yes Yes Yes Yes* MC1451A, MC1451A-E (4 axes) MC1251A, MC1251A-E (2 axes) MC1151A, MC1151A-E (1 axis) DK1451A
Yes Yes Yes Yes Yes Yes Yes Yes MC1401A, MC1401A-P (4 axes) MC1201A, MC1201A-P (2 axes) MC1101A, MC1101A-P (1 axis) Developer's Kit p/n's: DK1401A, DK1401A-P * optional using third I.C. ('-E' version)
Introduction
This manual describes the operational characteristics of the MC1231A, and MC1131A Motion Processors. These devices are members of PMD's 1st generation motion processor family, which consists of 16 separate products organized into four groups. Each of these devices are complete chip-based motion controllers. They provide trajectory generation and related motion control functions. Depending on the type of motor controlled they provide servo loop closure, on-board commutation for brushless motors, and high speed pulse and direction outputs. Together these products provide a software-compatible family of dedicated motion processor chips which can handle a large variety of system configurations. Each of these chips utilize a similar architecture, consisting of a highspeed DSP (Digital Signal Processor) computation unit , along with an ASIC (Application Specific Integrated Circuit). The computation unit contains special on-board hardware such as a multiply instruction that makes it well suited for the task of servo control. Along with a similar hardware architecture these chips also share most software commands, so that software written for one chipset may be reused with another, even though the type of motor may be different. This manual describes the operation of the MC1231A and MC1131A chipsets. For technical details on other members of PMD's 1st generation motion processors see the corresponding product manual.
Family Summary
MC1401 series (MC1401A, MC1201A, MC1101A, MC1401A-P, MC1201A-P, MC1101A-P) - These chipsets take in incremental encoder signals (standard version) or parallel word encoder signals (-P version) and output a motor command in either PWM or DACcompatible format. These chipsets come in 1, 2 or 4 axis versions and can be used with DC brushed motors, or brushless motors using external commutation. MC1231A series (MC1231A, MC1131A) - These chipsets take in incremental quadrature encoder signals and output sinusoidally commutated motor signals appropriate for driving brushless motors. They are available in one or two axis versions. Depending on the motor type they output two or three phased signals per axis in either PWM or DAC-compatible format. MC1241 series (MC1241A, MC1141A) - These chipsets provide internal microstepping generation for stepping motors. They are available in a one or a two-axis version. Two phased signals are output per axis in either PWM or DAC-compatible format. An incremental encoder signal can be input to confirm motor position. MC1451 series (MC1451A, MC1251A, MC1151A, MC1451A-E, MC1251A-E, MC1151A-E) - These chipsets provide very high speed pulse and direction signal output appropriate for driving step motorbased systems. They are available in a one, two, or four-axis version and are also available with quadrature encoder input. Each of these chipsets has an associated Chipset Developer's Kit available for it. For more information contact your PMD representative.
3
Electrical Characteristics
Overview
The MC1231A consists of two 68 pin PLCC's both fabricated in CMOS. The Peripheral Input/Output IC (I/O chip) is responsible for interfacing to the host processor and to the position input encoders. The Command Processor IC (CP chip) is responsible for all host command, trajectory, servo, and commutation computations, as well as for outputting the PWM and DAC signals. The following figure shows a typical system block diagram, along with the pin connections between the I/O chip and the CP chip.
Motor (4 axis)
Interconnections between the two chips consist of a data bus and various control and synchronization signals. The following table summarizes the signals that must be interconnected for the chipset to function properly. For each listed signal the I/O chip pin on the left side of the table is directly connected to the pin to the right. I/O Chip Signal Name CPData4 CPData5 CPData6 CPData7 CPData8 CPData9 CPData10 CPData11 CPAddr0 CPAddr1 CPAddr2 CPAddr3 CPCntr0 CPCntr1 CPCntr2 CPCntr3 CPWrite CPClk I/O Chip Pin 18 5 6 7 8 17 3 1 68 27 29 12 20 36 22 63 2 46 CP Chip Signal Name Data4 Data5 Data6 Data7 Data8 Data8 Data10 Data11 I/OAddr0 I/OAddr1 I/OAddr2 I/OAddr3 I/OCntr0 I/OCntr1 I/OCntr2 I/OCntr3 I/OWrite ClkOut CP Chip Pin 50 49 46 43 40 39 36 35 28 9 6 5 16 18 68 67 15 19
Encoder (1-2 axis)
Hall Sensors (1 - 2 axis)
Amplifier (1-2 axis)
Data4-11 I/OAddr0-3
I/O
I/OWrite I/OCntrl0-3 ClkOut
CP
Host Processor
For a complete description of all pins see the 'Pin Descriptions' section of this manual.
The CP and I/O chips function together as one integrated motion processor. The major components connected to the chip set are the Encoder (2, or 1 axes), (optionally) the motor Hall-sensors (2 or 1 axes), the motor amplifier (2, or 1 axes), and the host processor. The encoder signals are input to the I/O chip in quadrature format. Two signals encode the position, and an optional index signal contains a once-per-rotation locating signal. Hall sensors may be connected to the chipset to provide phase initialization information, although this is not required. Three Hall sensor signals are input per axis. The chipset's motor output signals are connected to the motor amplifier. Two types of output are provided; PWM (pulse width modulation), and DAC-compatible signals used with an external DAC (digital to analog converter). Because the output signals are commutated, more than one motor output signal will be output per axis. See Theory of Operations section on sinusoidal motor commutation for details. The host processor is interfaced via an 8-bit bi-directional bus and various control signals. Host communication is coordinated by a ready/busy signal, which indicates when communication is allowed.
Absolute Maximum Ratings
Unless otherwise stated, all electrical specifications are for both the I/O and CP chips. Storage Temperature, Ts.....................-55 deg. C to +150 deg. C Supply Voltage, Vcc.............................-0.3 V to +7.0 V Power Dissipation, Pd..........................650 mW (I/O and CP combined)
Operating Ratings
Operating Temperature, Ta .................0 deg. C to +70 deg. C Nominal Clock Frequency, Fclk ...........25.0 Mhz Supply Voltage, Vcc.............................4.75 V to 5.25 V * Industrial and Military operating ranges also available. Contact your PMD representative for more information.
4
DC Electrical Characteristics
(Vcc and Ta per operating ratings, Fclk = 25.0 Mhz)
Symbol Vcc Idd Input Voltages Vih Vil Vihclk Vihreset Output Voltages Voh Vol Iout Iin Iinclk Parameter Supply Voltage Supply Current Logic 1 input voltage Logic 0 input voltage Logic 1 voltage for clock pin (ClkIn) Logic 1 voltage for reset pin (reset) Logic 1 Output Voltage Logic 0 Output Voltage Tri-State output leakage current Input current Input current ClkIn -20 -50 -20 Min. 4.75 Max. 5.25 100 Vcc + 0.3 0.8 Vcc+0.3 Vcc+0.3 Units V mA V V V V Conditions open outputs
2.0 -0.3 3.0 4.0
2.4 0.33 20 50 20
V V uA uA uA
@CP Io = 300 uA @I/O Io = 4 mA @CP Io = 2 mA @I/O Io = 4 mA 0 < Vout < Vcc 0 < Vi < Vcc 0 < Vi < Vcc
AC Electrical Characteristics
(see reference timing diagrams) (Vcc and Ta per operating ratings; Fclk = 25.0 Mhz) (~ character indicates active low signal)
Timing Interval Encoder and Index Pulse Timing Motor-Phase Pulse Width Dwell Time Per State Index Pulse Setup and Hold (relative to Quad A and Quad B low) Reset Timing Stable Power to Reset Reset Low Pulse Width Clock Timing Clock Frequency (Fclk) Clock Pulse Width Clock Period T# T1 T2 T3 Min. 1.6 0.8 0 Max. Units uS uS uS
0.25 1.0 6.7 19.5 39 25.6 75 (note 2) 149 (note 2)
Sec uS Mhz nS nS
T4 T5
5
Timing Interval Command Byte Write Timing ~HostSlct Hold Time ~HostSlct Setup Time HostCmd Setup Time Host Cmd Hold Time HostRdy Delay Time ~HostWrite Pulse Width Write Data Setup Time Write Data Hold Time Data Word Read Timing ~HostSlct Hold Time ~HostSlct Setup Time HostCmd Setup Time HostCmd Hold Time Read Data Access Time Read Data Hold Time ~HostRead high to HI-Z Time HostRdy Delay Time Read Recovery Time Data Word Write Timing ~HostSlct Hold Time ~HostSlct Setup Time HostCmd Setup Time HostCmd Hold Time HostRdy Delay Time ~HostWrite Pulse Width Write Data Setup Time Write Data Hold Time Write Recovery Time DAC Interface Timing I/OAddr Stable to ~I/OWrite setup time ~I/OWrite Pulse Width Data Hold Time After ~I/OWrite ClkOut Low to I/OAddr stable ClkOut Low to ~I/OWrite Low ClkOut Low to Data Valid ClkOut Cycle Time I/OAddr Stable to DACSlct High ~I/OWrite Low to DACSlct High PWM Output Timing PWM Output Frequency
T# T6 T7 T8 T9 T13 T14 T15 T16 T6 T7 (read only) T8 (read only) T9 T10 T11 T12 T13 T17 T6 T7 T8 T9 T13 T14 T15 T16 T18 T19 T20 T21 T22 T23 T24 T25 T26 T27
Min. 15 10 10 25 50 35 30 15 - 20 - 20 25 10
Max. 2000 (note 3)
Units nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS nS Khz
70
2000 (note 3)
50 50 70 60 15 10 10 25 50 35 30 60 35 56 17 10 75 2000 (note 3)
70
95 40 92 92 160 typical (note 4) 66 44.5
24.5
note 1 note 2 note 3 note 4
~HostSlct and HostCmd may optionally be de-asserted if setup and hold times are met. Chip-set performance figures and timing information valid at Fclk = 25.0 only. For timing information & performance parameters at Fclk < 25.0 Mhz, call PMD. Two micro seconds maximum to release interface before chip set responds to command ClkOut from CP is 1/4 frequency of ClkIn (CP chip).
6
I/O Timing Diagrams
The following diagrams show the MC1231A electrical interface timing. T#' values are listed in the above timing chart.
Quadrature Encoder Input Timing
T1
Quad A
T1
T2
Quad B
T2
T3
~Index
T3
Index = ~A * ~B * ~IND
Clock Timing
ClkIn
T4
T4
T5
7
Command Byte Write TIming
T7
~HostSlct
T6
HostCmd
T8 T14
~HostWrite
T9
T15
HostData0-7
T16
HostRdy
T13
8
Data Word Read TIming
T7 Note 1
~HostSlct
T6
T8
HostCmd
Note 1
T9
T17
~HostRead
T12
HostData0-7
High-Z
High Byte T10 T11
High-Z
Low Byte
High-Z
HostRdy
T13
9
Data Word Write TIming
T7 Note 1
~HostSlct
T6
T8
HostCmd
Note 1
T9
T14
~HostWrite
T18
T14
T15
HostData0-7
T15 Low Byte T16 T16
High Byte
HostRdy
T13
10
DAC Interface Timing
T25
ClkOut
T22 T19
I/OAddr
T23 T20
~I/OWrite
T24
Data 0-11, DACAddr0,1
T21
T27 T26
DACSlct
11
Pinouts
9
1
61
9
1
61
10
60
10
60
I/O
(Top view)
26 44 26
CP
(Top view)
44
27
43
27
43
MC1231A Pinouts
4, 21, 25, 38, 55 4, 22, 33 VCC 28 42 24 13 26 30 9 23 40 35 19 39 34 16 33 46 52 45 29 12 2 20 36 QuadA1 QuadB1 Index1 Home1 QuadA2 QuadB2 Index2 Home2 Hall1A Hall1B Hall1C Hall2A Hall2B Hall2C DACSlct CPClk I/OClkIn I/OClkOut CPAddr2 CPAddr3 CPWrite CPCntrl0 CPCntrl1
I/O
GND
CPCntrl2 CPCntrl3 HostCmd HostRdy HostRead HostWrite HostSlct HostIntrpt HostData0 HostData1 HostData2 HostData3 HostData4 HostData5 HostData6 HostData7 CPData4 CPData5 CPData6 CPData7 CPData8 CPData9 CPData10 CPData11 CPAddr0 CPAddr1
22 63 41 37 51 47 48 44 50 61 53 65 67 62 64 60 18 5 6 7 8 17 3 1 68 27
VCC Data0 Data1 Data2 Data3 Data4 Data5 Data6 Data7 Data8 Data9 Data10 Data11 I/OAddr0 I/OAddr1 I/OAddr2 I/OAddr3 I/OWrite PosLimit1 PosLimit2 NegLimit1 NegLimit2 60 59 58 57 50 49 46 43 40 39 36 35 28 9 6 5 15 52 45 51 44
8 7 2 1 66 65 30 29 24 19 17 16 18 68 67 64 63 62 61
PWMMag1 PWMMag2 PWMMag3 PWMMag4 PWMMag5 PWMMag6 DAC16Addr0 DAC16Addr1 ClkIn ClkOut Reset I/OCntrl0 I/OCntrl1 I/OCntrl2 I/OCntrl3 DACLow0 DACLow1 DACLow2 DACLow3
CP
GND
14, 15, 32, 49, 54, 66
3, 34
MC1131A Pinouts
4, 21, 25, 38, 55 4, 22, 33 VCC HostCmd HostRdy HostRead HostWrite HostSlct HostIntrpt HostData0 HostData1 HostData2 HostData3 HostData4 HostData5 HostData6 HostData7 CPData4 CPData5 CPData6 CPData7 CPData8 CPData9 CPData10 CPData11 41 37 51 47 48 44 50 61 53 65 67 62 64 60 18 5 6 7 8 17 3 1 VCC
28 42 24 13 40 35 19 33 46 52 45 29 12 2 20 36 22 63 68 27
QuadA1 QuadB1 Index1 Home1 Hall1A Hall1B Hall1C DACSlct CPClk I/OClkIn I/OClkOut CPAddr2 CPAddr3 CPWrite CPCntrl0 CPCntrl1 CPCntrl2 CPCntrl3 CPAddr0 CPAddr1
I/O
8 7 2 30 29 24 19 17 16 18 68 67 64 63 62 61
PWMMag1 PWMMag2 PWMMag3 DAC16Addr0 DAC16Addr1 ClkIn ClkOut Reset I/OCntrl0 I/OCntrl1 I/OCntrl2 I/OCntrl3 DACLow0 DACLow1 DACLow2 DACLow3
CP
Data0 Data1 Data2 Data3 Data4 Data5 Data6 Data7 Data8 Data9 Data10 Data11 I/OAddr0 I/OAddr1 I/OAddr2 I/OAddr3 I/OWrite PosLimit1 NegLimit1
60 59 58 57 50 49 46 43 40 39 36 35 28 9 6 5 15 52 51
GND
GND
14, 15, 32, 49, 54, 66
3, 34
12
Pin Descriptions
The following tables provide pin descriptions for the MC1231-series chipsets. IC Pin Name I/O Chip Pinouts I/O QuadA1 QuadB1 QuadA2 QuadB2 Pin # 28 42 26 30 Description/Functionality Quadrature A, B channels for axis 1 - 2 (input). Each of these 2 pairs of quadrature (A, B) signals provide the position feedback for an incremental encoder. When the encoder is moving in the positive, or forward direction, the A signal leads the B signal by 90 degs. NOTE: Many encoders require a pull-up resistor on each of these signals to establish a proper high signal (check the encoder electrical specifications) NOTE: For MC1231A all 4 pins are valid. For MC1131A pins for axes 1 only are valid. Invalid axis pins can be left unconnected Index encoder signals for axis 1-2 (input). Each of these 2 signals indicate the index flag state from the encoder. A valid index pulse is recognized by the chip set when the index flag transitions low, followed by the corresponding A and B channels of the encoder transitioning low. The index pulse is recognized at the later of the A or B transitions. If not used this signal must be tied high. NOTE: For MC1231A both pins are valid. For MC1131A pins for axes 1 only are valid. Invalid axis pins can be left unconnected. Home signals for axis 1-2 (input). Each of these signals provide a general purpose input to the hardware position capture mechanism. A valid home signal is recognized by the chipset when the home flag transitions low. These signals have a similar function as the ~Index signals, but are not gated by the A and B encoder channels. For valid axis pins, If not used, this signal must be tied high. See below for valid pin definitions for the MC1231A and MC1131A. NOTE: For MC1231A both pins are valid. For MC1131A pins for axes 1 only are valid. Invalid axis pins can be left unconnected. DAC Select (output). This signal is asserted high to select any of the available DAC output channels. For details on DAC decoding see description of DAC16Addr0-1 signals. I/O chip clock (input). This signal is connected directly to the ClkOut pin (CP chip) and provides the clock signal for the I/O chip. The frequency of this signal is 1/4 the user-provided ClkIn (CP chip) frequency. Phase shifted clock (input). This signal must be connected to I/OClkOut (I/O chip), and inputs a phase shifted clock signal. Phase shifted clock (output). This signal must be connected to I/OClkIn (I/O chip), and outputs a phase shifted clock signal. I/O chip to CP chip communication address (input). These 4 signals are connected to the corresponding I/OAddr0-3 pins (CP chip), and together provide addressing signals to facilitate CP to I/O chip communication. I/O chip to CP chip communication write (input). This signal is connected to the ~I/OWrite pin (CP chip) and provides a write strobe to facilitate CP to I/O chip communication. I/O chip to CP chip communication control (mixed). These 4 signals are connected to the corresponding I/OCntrl0-3 pins (CP chip), and provide control signals to facilitate CP to I/O chip communication. Host Port Command (input). This signal is asserted high to write a host command to the chip set. It is asserted low to read or write a host data word to the chipset
I/O
~Index1 ~Index2
24 9
I/O
~Home1 ~Home2
13 23
I/O I/O
DACSlct CPClk
33 46
I/O I/O I/O
I/OClkIn I/OClkOut CPAddr0 CPAddr1 CPAddr2 CPAddr3 ~CPWrite CPCntrl0 CPCntrl1 CPCntrl2 CPCntrl3 HostCmd
52 45 68 27 29 12 2 20 36 22 63 41
I/O I/O
I/O
13
IC I/O
Pin Name HostRdy
Pin # 37
Description/Functionality Host Port Ready/Busy (output). This signal is used to synchronize communication between the DSP and the host. HostRdy will go low (indicating host port busy) at the end of a host command write or after the second byte of a data write or read. HostRdy will go high (indicating host port ready) when the command or data word has been processed and the chip set is ready for more I/O operations. All host port communications must be made with HostRdy high (indicating ready). Typical busy to ready cycle is 67.5 uSec, although it can be longer when host port traffic is high. Host Port Read data (input). Used to indicate that a data word is being read from the chip set (low asserts read). Host Port Write data (input). Used to indicate that a data word or command is being written to the chip set (low asserts write). Host Port Select (input). Used to select the host port for reading or writing operations (low assertion selects port). ~HostSlct must remain inactive (high) when the host port is not in use. Host Interrupt (output). A low assertion on this pin indicates that a host interrupt condition exists that may require special host action. Host Port Data 0-7 (bi-directional, tri-stated). These signals form the 8 bit host data port used during communication to/from the chip set. This port is controlled by ~HostSlct, ~HostWrite, ~HostRead and HostCmd.
I/O I/O I/O I/O I/O
~HostRead ~HostWrite ~HostSlct ~HostIntrpt HostData0 HostData1 HostData2 HostData3 HostData4 HostData5 HostData6 HostData7 CPData4 CPData5 CPData6 CPData7 CPData8 CPData9 CPData10 CPData11 Hall1A Hall1B Hall1C Hall2A Hall2B Hall2C
51 47 48 44 50 61 53 65 67 62 64 60 18 5 6 7 8 17 3 1 40 35 19 39 34 16
I/O
I/O chip to CP chip data port (bi-directional). These 8 bits are connected to the corresponding Data4-11 pins on the CP chip, and facilitate communication to/from the I/O and CP chips..
I/O
Hall Sensor A, B, and C commutation inputs for axis 1 and 2 (input). Each set of the three signals for one axis (A, B and C) encodes 6 valid signal states as follows: A on, A and B on, B on, B and C on, C on, C and A on. An on state is defined as a high signal. NOTE: These signals should only be connected to Hall sensors that are mounted 120-deg offset from each other. Schemes which provide Hall signals 60-deg apart will not work. NOTE: For MC1231A all 6 pins are valid. For MC1131A pins for axis 1 only are valid. Invalid axis pins can be left unconnected. I/O chip supply voltage pin. All of these pins must be connected to the supply voltage. Supply voltage = 4.75 to 5.25 V I/O chip ground pin. All of these pins must be connected to the power supply return.
I/O I/O
Vcc GND
4, 21, 25, 38, 55 14, 15, 32, 49, 54, 66
14
IC Pin Name CP Chip Pinouts CP PWMMag1 PWMMag2 PWMMag3 PWMMag4 PWMMag5 PWMMag6
Pin # 8 7 2 1 66 65
Description/Functionality PWM motor output magnitude signals (output). When the chip set is in PWM output mode these pins provide the Pulse Width Modulated magnitude signal to the motor amplifier.The PWM signals are output for each motor axis as follows: 3-Phase Brushless Signal Axis # PWMMag1 1 PWMMag2 1 PWMMag3 1 PWMMag4 2 PWMMag5 2 PWMMag6 2 2-Phase Brushless Signal Axis # PWMMag1 1 PWMMag2 1 PWMMag3 2 PWMMag4 2
Phase A B C A B C
Phase A B A B
NOTE: If using the MC1231A with one axis in 3-phase and the other axis in 2-phase mode, to avoid pin conflict, axis 1 should be assigned to 2-phase output, and axis 2 to 3-phase The PWM resolution is 10 bits, frequency = 24.5Kz. Positive limit switch input for axis 1-2. These signals provide directional limit inputs for the positive-side travel limit of the axis. Upon powerup these signals default to "active high" interpretation, but the interpretation can be set explicitly using the SET_LMT_SENSE command. (See Host Command Section for more info.) If not used these signals should be tied low for the default interpretation, or tied high if the interpretation is reversed. NOTE: For MC1231A both pins are valid. For MC1131A pins for axes 1 only are valid. Invalid axis pins can be left un connected. Negative limit switch input for axis 1-2. These signals provide directional limit inputs for the negative-side travel limit of the axis. Upon powerup these signals default to "active high" interpretation, but the interpretation can be set explicitly using the SET_LMT_SENSE command. (See Host Command Section for more info.) If not used these signals should be tied low for the default interpretation, or tied high if the interpretation is reversed. NOTE: For MC1231A both pins are valid. For MC1131A pins for axis 1 only are valid. Invalid axis pins can be left un connected. Axis Address used during 16-bit DAC motor command output (output). These signals encode the motor output axis address as shown in the table below (both 3-phase and 2-phase waveforms) Dac16Addr1 Low Low High High Dac16Addr0 Low High Low High Addressed Encoder Axis 1 phase A Axis 1 phase B Axis 2 phase A Axis 2 phase B
CP
PosLimit1 PosLimit2
52 45
CP
NegLimit1 NegLimit2
51 44
CP
DAC16Addr0 DAC16Addr1
30 29
Note: When connecting to 3-phase brushless motors only two of the three required phase outputs are provided in the DAC output mode. The third phase (phase C) is constructed external to the chipset, usually by the amplifier. See theory of operations for more information. To write a valid DAC motor command value DACSlct (I/O chip) and I/OAddr0-3 (CP chip) must be high, and I/OWrite (CP chip) must be low. The 16 bit DAC data word is organized as follows: High twelve bits are in Data0-11 (CP chip), and low 4 bits are in DACLow0-3 (CP chip). Clock In (input). This pin provides the chip set master clock (Fclk = 25.0 Mhz)
CP
ClkIn
24
15
IC CP CP
Pin Name ClkOut ~Reset
Pin # 19 17
CP
CP
CP
CP
I/OCntrl0 I/OCntrl1 I/OCntrl2 I/OCntrl3 Data0 Data1 Data2 Data3 Data4 Data5 Data6 Data7 Data8 Data9 Data10 Data11 DACLow0 DACLow1 DACLow2 DACLow3 I/OAddr0 I/OAddr1 I/OAddr2 I/OAddr3 I/OWrite
16 18 68 67 60 59 58 57 50 49 46 43 40 39 36 35 64 63 62 61 28 9 6 5 15
Description/Functionality Clock Out (output). This pin provides a clock output which is 1/4 the ClkIn frequency. This pin is connected to I/OClkin (I/O chip). Master chip set reset (input). When brought low, this pin resets the chip set to its initial condition. Reset should occur no less than 250 mSec after stable power has been provided to the chip set. I/O chip to CP chip communication control (mixed). These signals are connected to the corresponding CPCntrl0-3 pins on the I/O chip, and provide control signals to facilitate CP to I/O communication. Multi-purpose Data0-11. (Bi-directional). These pins have 2 functions: 1) Pins Data4-11 (8 bits total) are connected to the corresponding CPData4-11 pins on the I/O chip, and are used to communicate between the CP and I/O chips 2) Pins Data0-11 hold the high 12 bits of the DAC output value when the output mode is set to 16-bit DAC.
DACLow0-3 (output). These pins hold the lowest 4 bits of the 16 bit DAC output word when the output mode is set to 16 bit DAC. These pins, in conjunction with Data0-11 (providing the high 12 bits) make up the 16-bit DAC output word. Multi-purpose Address0-3 (output). These pins are connected to the corresponding CPAddr03 pins on the I/O chip. They have 2 functions; They provide addressing signals to facilitate communication between the I/O chip and CP chip, and they are used during DAC data decoding. To read a valid DAC value from Data0-Data11 (CP chip), DACSlct (I/O chip) and I/OAddr0-3 (CP chip) must all be high, and I/OWrite (CP chip) must be low. Multi-purpose write (output). This pin is connected to CPWrite on the I/O chip. It has 2 functions: 1) It provides a control signal to the I/O chip to facilitate communication between the I/O chip and CP chip. 2) It is used during DAC data decoding to read a valid DAC value from Data0-Data11 (CP chip), DACSlct (I/O chip) and I/OAddr0-3 (CP chip) must all be high, and I/OWrite (CP chip) must be low. CP chip supply voltage pin. All of these pins must be connected to the supply voltage. Supply voltage = 4.75 to 5,.25 V CP chip ground pin. All of these pins must be connected to the power supply return.
CP
CP CP
Vcc GND
4, 22, 33 3, 34
16
Theory of Operations
Internal Block Diagram
Incremental Encoder
Index Home
1/a 1/a
Motor Output
A PWM mag.
1/a 1/phase
B
1/a
DAC address
2
DAC data
16
DAC, PWM signal generator (6 channels)
I/O Chip
Quadrature decoder counter (2) Index capture register (2) Host I/O controller
5 8 1
CP Chip
Position register (2)
Commutation Generator (2) Digital Servo filtering (2) Trajectory profile generator (2)
System Registers (2)
Host command
1/a 1/a
PosLimit Control Data host interrupt
NegLimit
The above figure shows an internal block diagram for the MC1231A motion processor. Each servo axis inputs the actual location of the axis using incremental encoder signals. These encoder signals are digitally filtered for increased reliability and then passed on to a high speed up/down counter. This counter is used to maintain a 32-bit actual axis position register. The chipset can be operated in two modes. Closed loop mode, which is the normal operating mode of the chipset, performs trajectory generation, digital servo loop closure, and sinusoidal commutation. In this mode the motor output value is controlled by the servo filter. Open loop mode performs commutation only. It allows the motor output value to be controlled directly by the host processor. For either operating mode the desired motor output value is then combined with the current commutation value from an internal sinusoidal lookup. The commutation angle is determined using the
motor encoder. Two or more commutated signals are generated for each axis, with each signal being shifted either 90 or 120 degrees from one another, depending on the motor type. The resultant commutated signals are then output to the amplifier either as PWM or DAC signals. To perform continuous digital servoing, the trajectory and servo calculations are performed at every sample time for all enabled axes. The commutation is performed 4 times for each sample time. The following table summarizes the operational parameters of the MC1231A-series chipsets.
17
MC1231A-Series Chipset Operational Parameters
Available configurations: Operating Modes: Position Range: Velocity Range: Acceleration Range: Jerk Range: Trajectory Profile Generator Modes: 2 axes with internal sinusoidal commutation (MC1231A) 1 axes with internal sinusoidal commutation (MC1131A) Closed loop (motor command is driven from output of servo filter) Open loop (motor command is driven from user-programmed register) -1,073,741,824 to 1,073,741,823 counts -16,384 to 16,383 counts/sample with a resolution of 1/65,536 counts/sample S-curve profile: - 1/2 to + 1/2 counts/sample2 with a resolution of 1/65,536 counts/sample2. All others: -16,384 to 16,383 counts/sample2 with a resolution of 1/65,536 counts/sample2 -1/2 to +1/2 counts/sample3, with a resolution of 1/4,294,967,296 counts/sample3 S-curve (host commands final position, max velocity, max acceleration, and jerk) Trapezoidal (host commands final position, max velocity and acceleration) Velocity contouring (host commands max. velocity, acceleration) Electronic Gear (Encoder position of one axis is used as position command for another axis). A total of 2 electronic gears are supported (2 encoders and 1 output each). Not available in MC1131A 32768:1 to 1:32768 (negative and positive direction) PID+Velocity feedforward and motor bias 16 bits Sinusoidal Hall-Based Algorithmic (briefly energize motor coils) Microstepping (advance motor to known phase position) Direct set (explicitly set current commutation angle) 256 per electrical cycle 129 to 2,097,088 (using pre-scalar) counts per electrical cycle 15 kHz 120 degrees (used with 3-phase brushless motors) 90 degrees (used with 2-phase brushless motors) 3-phase brushless motors: 3 2-phase brushless motors: 2 2 (all motor types) 1.75 Mcounts/sec 270 uSec*minimum, 4,423 mSec max. 270 uSec* per enabled axis. 2 (one for each direction of travel) 2 (index, home signal) 160 nSec 116
Electronic Gear Ratio Range: Filter Modes: Filter parameter resolution: Commutation Waveform: Phase Initialization Methods:
# of sinusoidal lookups: range of commutation cycle: Commutation rate: Phasing Modes: # of PWM Output Phases: # of DAC Output Phases: Max Incremental. Encoder Rate: Servo loop rate range: Max servo loop rate: # of limit switches per axis # of position capture triggers: Capture trigger latency: # of Host commands:
*Exact servo loop time is 271.36 uSec, 270 is an approximation
Trajectory Profile Generation
The trajectory profile generator performs calculations to determine the target position, velocity and acceleration at each servo loop. These calculations are performed using the current profile mode and profile parameters set by the host. Four trajectory profile modes are supported: - S-curve point to point - Trapezoidal point to point - Velocity contouring - Electronic Gear
The commands to select these profile modes are SET_PRFL_S_CRV (to select the s-curve mode), SET_PRFL_TRAP (to select the trapezoidal mode) SET_PRFL_VEL (to select the velocity contouring mode) and SET_PRFL_GEAR (to select the electronic gear mod). Throughout this manual various command mnemonics will be shown to clarify chipset usage or provide specific examples. See the Host Communications section for a description of host command nomenclature.
18
The profile mode may be programmed independently for each axis. For example axis #1 may be in trapezoidal point to point mode while axis #2 is in S-curve point to point. Generally, the axis should be at rest when switching profile modes. Under certain conditions however, switching into certain profile modes "on-the-fly" is allowed. See specific profile descriptions for details.
Use the following figure showing a typical S-curve velocity vs. time graph for reference in reading the next section:
Phase Phase Phase I. II. III. Phase IV. Phase Phase Phase V. VI. VII.
S-curve Point to Point
The following table summarizes the host specified profile parameters for the S-curve point to point profile mode: Profile Parameter Destination Position Maximum Velocity Max. Accel. Jerk Representation & Range signed 32 bits -1,073,741,824 to 1,073,741,823 unsigned 32 bits* (1/216 scaling) 0 to 1,073,741,823 unsigned 16 bits ** (1/216 scaling) 0 to 32,767 unsigned 32 bits *** (1/232 scaling) 0 to 2,147,483,647 * uses 1/216 scaling. Chipset expects a 32 bit number which has been scaled by a factor of 65,536 from units of counts/sample time. For example to specify a velocity of 2.75 counts/sample time, 2.75 is multiplied by 65,536 and the result is sent to the chipset as a 32 bit integer (180,224 dec. or 2c000 hex.). ** uses 1/216 scaling. Chipset expects a 16 bit number which has been scaled by a factor of 65,536 from units of counts/sample time2. For example to specify an acceleration of .175 counts/sample time2, .175 is multiplied by 65,536 and the result is sent to the chipset as a 16 bit integer (11,469 dec. or 2ccd hex). *** uses 1/232 scaling. Chipset expects a 32 bit number which has been scaled by a factor of 4,294,967,296 (232) from units of counts/sample time3. For example to specify a jerk value of .0075 counts/sample time3, .0075 is multiplied by 4,294,967,296 and the result is sent to the chipset as a 32 bit integer (32,212,256 dec. or 1eb8520 hex). S-curve that doesn't reach max. acceleration counts/smpl2 counts/smpl3 Units counts counts/smpl S-curve profile The S-curve profile drives the axis at the specified jerk until the maximum acceleration is reached. (phase I). it will then drive the axis at jerk = 0 (constant acceleration) through phase II. It will then drive the axis at the negative of the specified jerk though phase III, such that the axis reaches the specified maximum velocity with acceleration = 0. This completes the acceleration phase. At the end of the acceleration phase of the move, the velocity will be constant, and the acceleration will be 0. At the appropriate time, the profile will then decelerate (phases V, VI and VII) symmetrically to the acceleration phase such that it arrives at the destination position with acceleration and velocity = 0. There are several conditions where the actual velocity graph of an Scurve motion will not contain all of the segments shown in the above figure. For example, if the max. acceleration is not reached before the "half-way" point to the max. velocity, then the actual velocity profile will not contain a phase II or a phase VI segment (they will have a duration of 0 servo loops). Such a profile is shown below:
Phase I. Phase III. Phase IV. Phase V. Phase VII.
Another such condition is if the position is specified such that max. velocity is not reached. In this case there will be no phase IV, and there may also be no phase II and VI, depending on where the profile is "truncated". While the S-curve profile is in motion, the user is not allowed to change any of the profile parameters. The axis must be at rest before a new set of profile parameters can be executed. If parameters are changed during motion then a 'command error'
19
will occur, and all new parameters will be ignored except the position. See the section of this manual entitled "Command Error" for more information.. Before switching to the S-curve point to point profile mode, the axis should be at a complete rest. When the axis is in the S-curve profile mode, the SET_MAX_ACC command should be used to load the max. acceleration value. The alternate acceleration loading command SET_ACC can not be used.
Vel.
Time Simple trapezoidal mode motion
Vel.
change max velocity
Trapezoidal Point to Point
The following table summarizes the host specified profile parameters for the trapezoidal point to point profile mode: Profile Parameter Destination Position Maximum Velocity Accel. Representation & Range signed 32 bits -1,073,741,824 to 1,073,741,823 unsigned 32 bits (1/216 scaling) 0 to 1,073,741,823 unsigned 32 bits (1/216 scaling) 0 to1,073,741,823 counts/smpl2 Units counts counts/smpl
Time
change target position
Complex trapezoidal mode motion
Velocity Contouring
The following table summarizes the host specified profile parameters for the Velocity contouring profile mode: Profile Parameter Maximum Velocity Acceleration Representation & Range unsigned 32 bits (1/216 scaling) 0 to 1,073,741,823 signed 32 bits* (1/216 scaling) -1,073,741,824 to 1,073,741,823 * negative numbers using 1/216 scaling are handled no differently than positive numbers. For example if an acceration value of -1.95 counts/sample time2 is desired, 1.95 is multipled by 65,536 and the result is sent to the chipset (-127,795 dec. or fffe0ccd hex). In this profile mode the host specifies two parameters, the commanded acceleration, and the maximum velocity. The trajectory is executed by continuously accelerating the axis at the commanded rate until the max. velocity is reached, or until a new acceleration command is given. The maximum velocity value must always be positive. Motion direction is controlled using the acceleration value. Positive acceleration values result in positive motion, and negative acceleration values result in negative motion. There are no restrictions on changing the profile parameters on the fly. Note that the motion is not bounded by position however. It is the responsibility of the host to generate acceleration and max. velocity command values which result in safe motion, within acceptable position limits. The following figure shows a typical velocity profile using this mode. Units counts/smpl counts/smpl2
In the trapezoidal point to point profile mode the host specifies a destination position, a maximum velocity, and an acceleration. The trajectory is executed by accelerating at the commanded acceleration to the maximum velocity where it coasts until decelerating such that the destination position is reached with the axis at rest (zero velocity). If it is not possible to reach the maximum velocity (because deceleration must begin) then the velocity profile will have no "coasting" phase. The acceleration rate is the same as the deceleration rate. A new maximum velocity and destination position can be specified while the axis is in motion. When this occurs the axis will accelerate or decelerate toward the new destination position while attempting to satisfy the new maximum velocity condition. When in Trapezoidal point to point profile mode, to change the acceleration, the axis must come to a complete stop. After this has occurred, a new acceleration value can be loaded. If the acceleration parameter is changed during motion then a 'command error' will occur, and all updated parameters will be ignored except the position. See the section of this manual entitled "Command Errors" for more information. Before switching to the Trapezoidal point to point profile mode, the axis should be at a complete rest. The following figure shows a velocity profile for a typical point to point trapezoidal move, along with a more complicated move involving on the fly changes to the maximum velocity and the destination position.
20
Example Velocity Contouring Mode
Vel.
change acceleration change max velocity
In addition, the master /slave axis combinations are fixed. The following chart shows the allowed master/slave combinations for each chipset: chipset p/n MC1231A MC1131A
Time
gear pairs (master -> slave) #2 -> #1 not available
change max velocity and acceleration
There are no restrictions on switching the profile mode to velocity contouring while the axis is in motion.
Typically the master axis is only used for encoder input. It is possible however to use the master axis as a normal driven axis by leaving it enabled, and using one of the three trajectory modes other than electronic gear for the master axis. The net effect of this will be to run two servo motors off of the same trajectory profile (although at a different ratio if so programmed). This configuration is shown in the previous diagram as 'optional' components. Using this configuration the chipset can be made to perform useful functions such as linear interpolation of two axis. There are no restrictions on changing the gear ratio when the axis is in motion, although care should be taken to select ratios such that safe motion is maintained. The specified gear ratio (SET_RATIO command) indicates the number of target counts generated per input encoder count. For example a gear ratio of 1.5 means 1.5 counts of the slave axis are generated for every count of the master axis. There are also no restrictions on changing to this profile mode while the axes is in motion.
Electronic Gear
The following table summarizes the host specified profile parameters for the electronic gear profile mode: Profile Parameter Gear Ratio Representation & Range signed 32 bits* (1/216 scaling) -1,073,741,824 to +1,073,741,823 Units -
* for example to specify a gear ratio of +1.5 to 1 the value 1.5*65,536 is sent to the chipset (98,304). Alternatively to set the gear ratio as -11.39 to 1 the value -11.39*65,536 is sent (746,455 dec. or fff49c29 hex.). In this profile mode, the host specifies one parameter, the gear ratio. The target position is generated by applying the specified gear ratio to the current position of another axis, slaving the driven axis to the axis providing the position input. The following figure shows the arrangement for encoders and motor drives in a typical electronic gearing application.
Motor Slave Encoder
Trajectory Control
Normally each of the above trajectory modes will execute the specified trajectory, within the specified parameter limits, until the profile conditions are satisfied. For example for the point-to-point profile modes this means that the profile will move the axis until the final destination position has been reached, at which point the axis will have a velocity of zero.
Amplifier
Halting The Trajectory
MC1231A
Amplifier
Master Encoder
In some cases however it is necessary to halt the trajectory manually, for safety reasons, or simply to achieve a particular desired profile. This can be accomplished using one of two methods; abrupt stop, or smooth stop. Abrupt stops are accomplished using the STOP command. This command instantaneously stops the trajectory generator by setting the velocity of the axis to zero. This control mode is typically used during an emergency stop, when no deceleration phase is desired. Smooth stops are accomplished using the SMOOTH_STOP command. This command causes the trajectory to decelerate at a rate equal to the specified acceleration rate, until a velocity of zero is reached. In addition the form of the deceleration is symmetric to the acceleration
Motor
Optional
Because a geared axis takes up two encoder channels, the total number of geared axes supported per chipset is 1/2 the total # of axes.
21
phase. For example if the profile mode is S-curve, and a SMOOTH_STOP command is given, the profile will decelerate in a manner exactly equal and opposite to the acceleration phase. The STOP command functions in all profile modes; S-curve pointto-point, Trajectory point-to-point, Velocity Contouring, and Electronic Gear. The SMOOTH_STOP functions in S-curve point-to-point, Trajectory point-to-point, and Velocity Contouring profiling mode. It does not function in Electronic Gear mode. Caution should be exercised when using the STOP command due to the large and abrupt changes in motion that may occur.
The motion complete and in-motion bits indicate the state of the trajectory generator, not the actual motor. Even if the trajectory generator has completed a motion, the actual axis position may or may not be at rest depending on servo lag, stability, and other system conditions.
Digital Servo Filtering
A digital filter is available for use in calculating a motor output signal. The filter used is a PID (proportional, integral, derivative) filter, along with a velocity feedforward term and a term to adjust the offset, also called the DC bias value. This filter type is known as a PID+Vff filter. This filter uses programmable gain values which can be tuned to provide excellent control accuracy and stability over a large range of systems. The following schematic diagram shows the computational flow for the PID+Vff digital filter.
Motion Complete Status
To simplify the programming of a complete motion system it is convenient to have the motion chipset indicate when a particular profile move has been completed. This function is provided by two status bits in the chipset's status word (See the section of this manual entitled "Axis Status " for more information on the axis status word). These two bits are called the motion complete bit, and the in-motion bit. The motion complete bit is controlled interactively by the chipset and the host. After a motion has completed, the chipset sets the motion complete bit on. The host may then poll this bit to determine that motion is complete, or if desired, the host can program the chipset to automatically signal when the motion is complete (using an interrupt). In either case once the host has recognized that the motion has been completed the host clears the motion complete bit, enabling the bit to indicate the end of motion for the next move. The following list shows the conditions that will cause the motion complete bit to occur: Profile has reached the destination position (point-to-point profile modes only) Axis trajectory reaches a velocity of zero and the current velocity command is zero SMOOTH_STOP command is given and axis trajectory reaches a velocity of zero STOP command is given Limit switch condition occurs
Target Velocity
Bias
Proportional Term P = En * Kp
Kvff
Target Position + -
Integral Term I = (S+En)*Ki S = S+En Derivative Term D = (En-E(n-1))*Kd
++ + + +
Output To Motor
Actual Position From Encoder
In the PID+Vff filter, the host-specified parameters are: Symbol Kp Ki Kd Ilim Kvff MtrBias Name Proportional Gain Integral Gain Derivative Gain Integration Limit Velocity Feedforward gain DC motor offset Representation & Range unsigned 16 bits (0 to 32767) unsigned 16 bits (0 to 32767) unsigned 16 bits (0 to 32767) unsigned 16 bits (0 to 32767) unsigned 16 bits (0 to 32767) signed 16 bits (-32767 to 32767)
The in-motion bit is similar to the motion complete bit except that it continuously indicates the status of the axis without interaction with the host. In addition this bit is used exclusively for polled mode operations. It can not cause an interrupt to the host to be generated. The motion complete and the in-motion indicator bits function in the S-curve point-to-point, Trapezoidal point-to-point, and Velocity Contouring profile modes only. They do not function when the profile mode is set to electronic gearing.
The PID+Vff filter is calculated as follows: Position Errorn = En = TPn - APn Outputn = En*Kp + (En-En-1)*Kd + Int(En)*Ki/256 + TrgtVel*Kvff/4 + MtrBias
22
where:
En is the position error at sample time n TPn is the target position at sample time n APn is the actual position at sample time n Int(En) is the integration sum at time sample n TrgtVel is the current desired velocity in counts/sample MtrBias is the motor bias value
The motor bias value is applied to the filter value at all times when the chipset is in closed loop mode. If the chipset transitions to open loop mode (MTR_OFF command is given or a motion error occurs with automatic motor stop enabled) than the motor bias value will be output to the motor by itself, until a manual motor command value is given (SET_MTR_CMD command), at which point this host-provided motor command value, without modification by the motor bias value, becomes the active motor command. The following example illustrates this: If the chipset is in closed loop mode with a motor bias value of 100, then if a motor off command is given (MTR_OFF), then the output motor command will be exactly 100. Thereafter if the host sends a manual motor command of 200 (using the SET_MTR_CMD command), then the output motor command will be 200. At this instant the chipset is returned to closed loop mode however (MTR_ON command), the motor bias value will again be added to the filter output. If the specified motor bias value does not properly compensate for the offsetting DC load, then after a motion error with automatic motor stop enabled or after a MTR_OFF command the axis may move suddenly in one direction or another. It is the responsibility of the host to select a motor bias value such that safe motion is maintained.
All multiplied error quantities are saturated to fit within a 16 bit number so that no discontinuities in the output signal occur at values beyond +/2 15. The integral term is actually maintained to an accuracy of 24 bits, but only the top 16 bits are used. This results in a more useful range for Ki, the integral gain. The result of this calculation is a 16 bit number. The top 10 bits of this result become the output value if the motor output mode is PWM (10 bits magnitude), and the entire word is used if the mode is DAC16. Care should be taken when setting a Ki value for the first time. If the system has already been running and the integration value is unknown, an abrupt 'jump' may occur when the Ki value is set to a non-zero value. To avoid this set the I_LM (integration limit) to 0, set the Ki to the desired value, and then set I_LM to the desired integration limit value. This will 'clear' all prior integration values, smoothly enabling the integration function from that point forward.
Parameter Loading & Updating
Motor Limit
In addition to setting various PID gain values the MC1231A also allows the maximum value output by the filter to be set. This motor limit value is set using the command SET_MTR_LMT. It can be read back using the command GET_MTR_LMT. The specified motor limit affects the filter output such that if the magnitude of the filter output value (positive as well as negative) exceeds the motor limit than the output value is maintained at the motor limit value. Once the filter output value returns below the specified limit than normal servo filter values are output The motor limit is only applied during closed loop servo operations, when the servo filter controls the motor output value. It does not affect the output motor value applied during open loop operations Various profile & servo parameters must be specified by the host for an axis to be controlled in the desired manner. To facilitate precisely synchronized motion, these parameters and related control commands are loaded into the chip using a double-buffered scheme. In this scheme, the parameters and action commands being loaded are not acted upon (copied from the double-buffered to the active registers) until an update signal is given. This update signal can consist of either a "manual" update command, or one of several conditional breakpoints. Whichever update method is used, at the time the update occurs, all of the double buffered registers and commands will be copied to the active registers. Conversely, before the update occurs, loading the double-buffered registers or executing the double buffered commands will have no effect on the system behavior. The double buffered registers are listed below.
Motor Bias
When using an axis which has a net force in one direction or the other (such as a vertical axis which experiences the force of gravity) the motor bias function of the PID compensation filter may be useful. By adding a constant bias value to the filter output, the overall position error of the filter can be reduced by directly compensating for the constant force. The motor bias value is set using the command SET_MTR_BIAS. It can be read back using the command GET_MTR_BIAS.
23
Register Name destination position maximum velocity acceleration maximum acceleration jerk ratio Kp Ki Kd Kvff Integration limit
Command to set SET_POS SET_VEL SET_ACC SET_MAX_ACC SET_JERK SET_RATIO SET_KP SET_KI SET_KD SET_KVFF SET_I_LM
generator) equals or exceeds the specified breakpoint value. This breakpoint is set using the SET_POS_BRK command. Negative Target Position Breakpoint:. A 32 bit position breakpoint can be specified which will result in the parameters being updated when the current target position (the instantaneous desired axis position output from the profile generator) equals or is less than the specified breakpoint value.This breakpoint is set using the SET_NEG_BRK command. Positive Actual Position Breakpoint A 32 bit position breakpoint can be specified which will result in the parameters being updated when the current actual position (the instantaneous position of the actual axis hardware) equals or exceeds the specified breakpoint value.This breakpoint is set using the SET_ACTL_POS_BRK command. Negative Actual Position Breakpoint:. A 32 bit position breakpoint can be specified which will result in the parameters being updated when the current actual position (the instantaneous position of the actual axis hardware) equals or is less than the specified breakpoint value.This breakpoint is set using the SET_ACTL_NEG_BRK command. Time Breakpoint A 32 bit time breakpoint can be specified which will result in the parameters being updated when the # of servo loops executed since chip set reset (the current chip set time) is equal to the time breakpoint value.The # of servo loops continuously increases until it rolls over from 232 - 1 back to 0.The time breakpoint is set using the SET_TIME_BRK command. Motion Complete Breakpoint A breakpoint can be specified which will result in the parameters being updated when the previous motion has been completed (motion complete bit is set). When using this breakpoint no 32 bit compare value is required. External Breakpoint A breakpoint can be specified which will result in the parameters being updated when the home signal of the corresponding axis becomes active (low). When using this breakpoint no 32 bit compare value is required. This breakpoint is useful whenever it is desired that an external signal starts, stops, or otherwise modifies the profile movement. Normally, whenever one of these conditions has been programmed and the condition occurs, the double-buffered parameters will automatically be shifted to the active registers. There is a mechanism to disable this "automatic update upon breakpoint" however. This is discussed in the next section. The above breakpoint modes are particularly useful during multi-axis motion. This is because the next profile commands (set of hostspecified trajectory commands) can be pre-loaded and activated at the precise position or time required, with no delay incurred to send an update or load parameters command.
The double-buffered commands are: STOP, SMOOTH_STOP, and SYNCH_PRFL.
Manual Update
There are two methods of manually updating the double-buffered parameters, one for a single axis instantaneous update and one for a multiple-axis update. The single axis instantaneous update, which is specified using the UPDATE command, forces the parameters for the current axis to be updated at the next servo loop. The multiple axis instantaneous update, which is specified using the MULTI_UPDATE command, causes multiple axes to be updated simultaneously. This can be useful when synchronized multi-axis profiling is desired. This command takes a 1 word argument which consists of a bit mask, with 1 bit assigned to each axis. Executing this command has the same affect as instantaneously switching to each desired axes, and executing an UPDATE command.
Breakpoints
A breakpoint is a convenient way of programming a profile or filter change upon some specific condition. There are two types of breakpoints, those that have a 32-bit comparitor value associated with them and those that do not. For those that have the comparitor, a 32-bit comparitor value is loaded into the breakpoint compare register first, and then one of the breakpoint conditions is specified. For those breakpoint modes without associated comparitor values only the breakpoint condition needs to be specified. The double-buffered registers and commands will be updated upon satisfaction of the specified breakpoint condition. Here is a list of all of the available breakpoint conditions. Positive Target Position Breakpoint A 32 bit position breakpoint can be specified which will result in the parameters being updated when the current target position (the instantaneous desired axis position output from the profile
24
After a breakpoint condition has been satisfied it is no longer active. To set up another breakpoint condition, a new one must be explicitly set by the host. The double-buffered registers that are shifted to the active registers do not change upon being shifted, only the active registers change. Except for the MULTI_AXIS command, parameter loading and updating is controlled individually for each axis. In addition each axis has a separate 32-bit breakpoint register, and can be set to various individual breakpoint conditions.
Disabling Automatic Profile Update
Normally, when a breakpoint condition has been satisfied, it causes the profile & filter parameters to be automatically updated. For certain types of profiles however, it may be desirable to still use the breakpoint mechanism (to allow it to generate a host interrupt for example), but not to have the profile update. Whether the profiles are automatically updated or not for a given axis is controlled by the commands SET_AUTO_UPDATE_ON and SET_AUTO_UPDATE_OFF. When auto update is set to on, the breakpoint/profile mechanism behaves as described above. When set to off, upon a breakpoint condition, no profile update will occur. When in this mode the only way to update the profile is to use the UPDATE command or the MULTI_UPDATE command.
External Breakpoints and Homing
By connecting a home input sensor to the home signal input of the MC1231-series chipsets it is possible to cause the chipset to halt a motion at the moment it receives the home signal. This capability makes it ideal for performing a home sequence. The following host I/O sequence illustrates this: GET_HOME ; check to make sure axis not already at ; home. If so, then a 'reverse' move must ; be made to retract axis from home switch. ; This 'reverse' sequence is not indicated ; here for simplicity sake ; set trigger capture to home signal ; clear status register ; clear out any previous captures ; load home move parameters
Travel Limit Switches
The MC1231-series chipsets support motion travel limit switches that can be used to automatically recognize an "end of travel" condition. The following figure shows a schematic representation of an axis with travel-limit switches installed, indicating the "legal" motion area and the over-travel regions.
negative limit switch positive limit switch
SET_CAPT_HOME CLR_STATUS GET_CAPT SET_POS 12345 SET_VEL 23456 SET_ACC 345 UPDATE SET_EXT_BRK SMOOTH_STOP
; start home move ; initiate external breakpoint mode ; load (but do not update) a stop command
negative over-travel region
Legal travel region positive over-travel region
This sequence will start a homing move which will come to a smooth stop as soon as the axis encounters the home switch. In addition the capture register will be loaded with the exact location of the home sensor. This register can be used in conjunction with the GET_ACTL_POS and SET_ACTL_POS commands to set the position to any desired location. For example if it is desired that the home sensor be located at a position of 0, then the new position should be set to the current actual axis position minus the capture position. This is shown in the sequence below, which should be executed after the axis has come to a stop. current_pos = GET_ACTL_POS capture_pos = GET_CAPT SET_ACTL_POS (current _pos - capture_pos) As is the case for all of the breakpoint modes, the external breakpoint can not only be used to stop an ongoing move, but to start or otherwise modify a move as well. This flexibility makes it well suited for applications such as cut-on-the-fly or other externally-initiated motions.
There are two primary services that the MC1231A provides in connection with the over-travel limit switch inputs: 1) The host can be automatically notified that an axis has entered an over-travel condition, allowing the host to take appropriate special action to manage the over-travel condition. Upon entering an over-travel condition, the trajectory generator will automatically be halted, so that the motor does not travel further into the over travel region.
2)
To recover from an over-travel condition the corresponding status bits in the status word should be reset (see the section of this manual on axis status for details on resetting status word bits). Once this has been performed the host can command a trajectory move to bring the axis out of the over-travel region. The over-travel detector is 're-armed' when the axis exits the over travel condition. Only one over-travel signal can be processed at a time. For example if the negative over travel switch becomes active, the corresponding status bits must be cleared, and the axis moved
25
into the legal travel range before a positive over travel switch will be recognized.
Servo Loop Control & Timing
Each of the axes on the MC1231-series chipsets can be individually enabled or disabled *. Each enabled axis receives a "time slice" of the available computation power of the CP chip. * This is true even for the MC1131A, which has only one axis, although generally disabling the only axis has no utility. Disabled axes do not use any computing power; thus it is possible to increase the servo loop rate when less than the supported number of axes are used. To set the servo loop rate to a value other than the default value, use the command SET_SMPL_TIME. The value GET_SMPL_TIME can be used to read this value back from the chipset. The formula for determining the minimum loop time (maximum sampling frequency) for a given number of enabled axis is 135 uSec for each enabled axis. The following table summarizes the minimum loop time for the standard and -P parts. # Axes enabled 2 1 Minimum time 540* 270**
Motion Error Detection and Recovery
Under certain circumstances, the actual axis position may differ from the target (desired) axis position by an excessive amount. Such an excessive position error often indicates a potentially dangerous condition such as motor or encoder failure, or excessive mechanical friction. To detect this condition, thereby increasing safety and equipment longevity, the MC1231A includes a programmable maximum position error. The maximum position error is set using the command SET_POS_ERR, and read back using the command GET_POS_ERR. To determine whether a motion error has occurred the maximum position error is continuously compared against the actual position error. If the maximum position error value is exceeded, then the axis is said to be in "motion error". When this occurs the motion error bit in the axis status word is set, and the axis motor may be turned off, depending on the state of the automatic motor shutdown mode (see SET_AUTO_STOP_ON and SET_AUTO_STOP_OFF host command descriptions). At the moment motion error occurs several events occur simultaneously. The following list describes these events: Motion Error bit of the axis status word is set If automatic motor stop is enabled the motor is set off (set to open loop control mode) If the automatic stop is enabled the trajectory generator is stopped
The loop time is specified to the chip set as an integer number from 1 to 32,767 with units of 135*** uSec For example to set the standard MC1231A part for the minimum loop time with two axes enabled, a value of 4 (4*135 = 540 uSec) would be sent to the chipset using the SET_SMPL_TIME command. * actual value = 542.72 uSec, 540 is an approximation ** actual value = 271.36 uSec, 270 is an approximation *** actual value = 135.68 uSec, 135 is an approximation Changing the loop time to increase servo loop rate when axes are disabled is not required. It is available as an option if greater loop speed is desired. The servo loop rate should generally not be changed while axes are in motion. It is the responsibility of the host to insure that the servo loop rate that is commanded can be supported for the # of axes enabled. Failure to observe the maximums specified in the above table may result in unexpected axis behavior.
If the automatic motor stop mode is not set than only the motion error status bit is set.
Recovering From A Motion Error
To recover from a motion error which results in the motor being turned off, the following sequence should be performed: 1) Determine cause of motion error and correct problem (this may require human intervention). Turn motor on using MTR_ON command.
2)
After the above sequence, the axis will be servoing correctly, and the profile generator will be at rest, ready for another move.
26
Host Communications
Electrical Interface
The MC1231A communicates to the host processor via an 8-bit bidirectional data port. 5* additional signals are used to synchronize communication operations. The following table gives a brief description of the control signals used during host communication: Signal ~HostSlct ~HostWrite Description Selects the host port for operations Writes a byte of data (or a command) to the chip set. A write operation can only occur when the ready/busy line indicates ready Reads a byte of data from the chip set. A read operation can only occur when the ready/busy line indicates ready Is asserted in combination with the HostWrite signal when a command is being written to the chip set. Indicates to the host that the host port is available for operations
read or write, this signal will go busy. It will return to ready when the chipset can receive another I/O operation. For more specific electrical information on the host interface operations, see the pin descriptions and the timing diagram.
Packet Format
All communications to/from the chip set take the form of packets. A packet is a sequence of transfers to/from the host resulting in a chip set action or data transfer. Packets can consist of a command with no data (Dataless Command), a command with associated data that is written to the chip set (Write Command) or a command with associated data that is read from the chip set (Read Command). All commands with associated data (read or write) have either 1 or 2 words of data. See the host commands section for more information on the length of specific commands. If a read or a write command has 2 words of associated data (a 32 bit quantity) the high word is loaded/read first, and the low word is loaded/read second. The following charts show the generic command packet sequence for a Dataless Command, a Write Command, and a Read Command. The hardware communication operation described in the previous section to accomplish each type of transfer is shown in the left column.
~HostRead
HostCmd HostRdy
*An additional signal, HostIntrpt is provided to the host. This signal is not used directly in communication operations, and is discussed in a separate section Three types of hardware communication operations are possible between the host processor and the chip set; Command Write, Data Write and Data Read. Each of these operations transfers information to or from the chip set, and is coordinated using the 5 control signals listed above. A Command Write operation involves the transfer of a single byte command to the chip set. To perform a write command operation, the desired command is loaded on the 8 data pins and ~HostSlct and ~HostWrite are brought low, while HostCmd is brought high. A Data Write operation involves the transfer of two bytes of data (1 word) to the chip set. To transfer the first byte (high byte), the desired data byte is loaded on the 8 data bits and ~HostSlct, ~HostWrite and HostCmd are brought low. The HostWrite signal is then brought high to end the transfer of the first byte. To transfer the second byte (low byte), the desired data byte is loaded on the 8 data bits and ~HostSlct, ~HostWrite and HostCmd are again brought low. A Data Read operation involves the transfer of two bytes of data (1 word) from the chip set to the host. To transfer the first (high) byte, ~HostSlct, ~HostRead,and ~HostCmd signals should be brought low, and the data should be read from the 8 bit data bus. The HostRead signal is then brought high to end the transfer of the first byte. To transfer the second (low) byte, ~HostSlct, ~HostRead, and ~HostCmd are again brought low and the data should be read from the data bus. Before any command write, data write or data read operations are performed, the user must check that the HostRdy signal indicates ready. After a command write, or after the second byte of each
Dataless Command Time Cmd Write: Data Write: Data Read: --> Cmd byte [pkt checksum] Write Command Time Cmd Write: Data Write: Data Read: --> Cmd byte word 1 [word 2] [pkt checksum] Read Command Time Cmd Write: Data Write: Data Read: --> Cmd byte Word 1 [Word 2] [pkt checksum] --> --> -> --> --> --> --> --> -->
[ ] Indicates an optional operation
27
Packet Checksum
The above charts show that at the end of each packet, a checksum word is available for reading. Although host to chip set I/O operations are extremely reliable, for critical applications the checksum can provide a further reliability enhancement (particularly in very noisy electrical environments, or when the communication signals are routed over a media that may have data losses such as a serial link). This checksum consists of a 16-bit sum of all previous communications that have occurred for the associated command. The command byte is included in the low byte of the 1st checksum word (high byte set to 0). Data words are added as is to the checksum value. For example if a SET_VEL command (which takes two 16-bit words of data) was sent with a data value of fedcba98 (hex), the checksum would be: 0011 (code for SET_VEL command) + fedc (high data word) + ba98 (low data word) ---------1b985 check sum = b985 (keep bottom 16 bits only) Reading the checksum is optional. Recovering from an incorrect packet transfer (bad checksum) will depend on the nature of the packet. Read and Write operations can always be re-transmitted, while a command resulting in an action may or may not be re-tried, depending on the command and the state of the axis.
The following list indicates the command sequences that result in a command error: Changing and updating the acceleration (SET_ACC, UPDATE) when in the trapezoidal profile mode and when the axis trajectory is still in motion. Changing and updating either the velocity, max acceleration, or jerk (SET_VEL or SET_MAX_ACC or SET_JERK, and then UPDATE) when in the S-curve profiling mode and when the trajectory is in motion Commanding a move in the same direction as a limit switch condition when in Trapezoidal or S-curve profile mode. For example if travelling in the positive direction and a limit switch is encountered, a further move in the positive direction will be ignored and a command error will be generated.
-
-
Once a command error occurs the command error bit is set, and the illegal profile changes are ignored. If additional parameters are also changed such as position or any filter values as part of the same UPDATE command then these parameters will not be rejected at the time of the UPDATE, and they will become the active values.
Axis Addressing
Most chip set commands alter the parameters or the operating state of one axis at a time. In this way each axis can be controlled separately. To facilitate efficient communication for these types of commands, the chip set maintains the concept of a current axis number, which can be set explicitly by the host. After setting the current axis number, commands that are addressed to the current axis will automatically operate on this axis. The current axis number will stay the same until it is changed by one of the commands that alter the current axis number. As an illustration of this, the following sequence sets the current axis to #2, updates some motion parameters, and switches to axis #1, and alters some other motion parameters.
Illegal Commands
When the MC1231A receives a command that is illegal (see host command summary for listing of illegal commands), it will signal this condition by returning a checksum of 0, regardless of the illegal command value or the value of any subsequent data written to the host as part of the illegal command sequence. In this manner the host processor checksum can be used to detect communication problems as well as an illegal command sequence, resulting in a simplification of the host processor communication code.
SET_2 SET_POS UPDATE SET_1 SET_ACCEL UPDATE
02345678
Command Errors
If a command, or command sequence is sent to the chipset that is not valid at a given operating condition of the chipset, but is valid at other times, this command is said to cause a command error. When a command error occurs this condition is indicated by the 'command error' bit of the axis status word (See the section of this manual entitled "Axis Status" for more information on the axis status word).
00001234
-> sets current axis to #2 -> loads current axis (#2) dest. position with value of 2345678 -> causes the loaded value to take effect (axis # 2) -> sets current axis to #1 -> loads current axis (#1) with acceleration value 1234 -> causes the loaded value to take effect (axis # 1)
28
Axis Status
The MC1231A supports a status word for each axis, which contains various information about the state of the axis. The status word is a 16-bit register which can be queried using the command GET_STATUS. It contains the following information (Bit encoding is 0 = LSB, 15 = MSB): Bit # 0 Description Motion complete flag. This bit is set (1) when the axis trajectory has completed. This flag is only valid for the Scurve and trapezoidal, and velocity contouring profile modes. Wrap-around condition flag. This bit is set (1) when the axis has reached the end of its travel range,and has wrapped to the other end of the travel range. Specifically, when travelling in a positive direction past the position +1,073,741,823, the axis will wrap to position 1,073,741,824, and vice-versa. Breakpoint reached flag. This bit is set (1) when one of the breakpoint conditions has occurred. Index pulse received flag. This bit is set (1) when an index pulse has been received. Motion error flag. This bit is set (1) when the position error is exceeded (see filter section for more information). This bit can only be reset when the axis is no longer in a motion error condition Positive limit switch flag. This bit is set (1) when the positive limit switch goes active. Negative limit switch flag. This bit is set (1) when the negative limit switch goes active. Command error flag. This bit is set (1) when a command error has occurred. motor on/off status (1 indicates motor is on, 0 indicates motor is off). axis on/off status (1 indicates on, 0 indicates off). In-motion flag. This bit continuously indicates whether or not the axis trajectory is in motion. This bit is set (1) when the axis is in motion, and cleared (0) when the axis trajectory is not in motion. commutation error flag. This bit is set (1) when a commutation error is detected. current axis # (13 bit = high bit, 12 bit = low bit). Therefore axis encoding is as follows: Bit 13 Bit12 Axis 0 0 1 0 1 2 reserved (may contain 0 or 1)
Bits 0-7 and 11 of the status word operate using a set/reset mechanism. These flags are set by the chipset, and must be reset by the host. If they are not reset by the host they will remain active indefinitely.
Miscellaneous Mode Status Word
There is another status word available that indicates the current status of various mode settings or conditions. The miscellaneous mode status word is a 16-bit register which can be queried using the command GET_MODE. It contains the following information (Bit encoding is 0 = LSB, 15 = MSB): Bit # 0-6 7 Description Used internally by chipset. Contains no host-useable information. Stop on motion error mode flag. This bit indicates the state of the stop on motion error mode, set by the commands SET_AUTO_STOP_ON and SET_AUTO_STOP_OFF. A 1 indicates auto stop is on. Used internally by chipset. Contains no host-useable information. Auto update flag. This bit indicates the state of the auto update mode, set using the commands SET_AUTO_UPDATE_ON and SET_AUTO_UPDATE_OFF. A 1 indicates that auto update is disabled. Trajectory generator mode. This bit indicates the mode of the trajectory generator, set using the commands SET_PRFL_S_CRV, SET_PRFL_TRAP, SET_PRFL_VEL, SET_PRFL_GEAR. The encoding is as follows: Bit 12 Bit11 Profile Mode 0 0 trapezoidal 0 1 velocity contouring 1 0 s-curve 1 1 electronic gear Phase #. These bits indicate the current phase # of the Scurve profile (only valid if the current profile mode is Scurve). A 0 indicates that the profile has not started yet, and phases 1-7 indicate the phase #'s corresponding to the phases described in the S-curve profiling mode. The 3-bit phase # word is encoded bit 15 MSB, and bit 13 LSB.
1
2 3 4
8-9 10
5 6 7 8 9 10
11,12
13-15
11 12,13
Host Interrupts
In many situations, during axis motion or at other times, it is useful to have the chip set signal the host that a special condition has occurred. This is generally more convenient and efficient than having the host poll the chip set for various possible conditions. This chip set-initiated signal is known as a host interrupt. Several chip set conditions may occur that can result in the generation of a host interrupt. Whether these conditions in fact interrupt the host is
14,15
Bits 8-10 and 12-13 indicate continuous status information, and do not need to be reset by the host. Bits 0-7 and bit 11 indicate various status flags that can also generate host interrupts (see next section for details). These flags are set by the chipset, and must be reset by the host (They will not be cleared by the chipset).
29
controllable for each condition and for each axis. The mechanism used to control each condition is a mask register. The interrupt conditions correspond to bits 0-7 and 11 of the status register (the axis event flags), described in the previous section. These conditions are summarized below: Motion Complete Wrap-around condition Break Point Reached Position Capture Received Motion Error Occurs when the profile is complete Occurs when the axis position wraps. Occurs when a breakpoint condition has been satisfied. Occurs when the encoder index pulse or home pulse has been captured Occurs when the maximum position error set for a particular axis has been exceeded Occurs when the negative over-travel limit switch is active Occurs when the positive over travel limit switch is active Occurs when a host communication sequence causes a command error condition
SET_INTRPT_MASK GET_INTRPT
Sets the interrupt conditions mask Returns the status of the interrupting axis (including the interrupting axis #). The current axis # is not altered by this command Changes the current axis # to the interrupting axis. This is a 'time saver' command which performs the dual operations of getting the interrupting axis # and switching to that axis in one command. Clears particular conditions for the interrupting axis. The current axis # is not altered by this command.
SET_I
RST_INTRPT
Negative Limit Switch Positive Limit Switch Command Error
To facilitate determining the nature of the interrupt, the status register holds the axis #, allowing the interrupting axis # to be determined. The following represents a typical sequence of interrupt conditions and host responses. Assume for the purposes of this example that an axis (not the current axis) has hit a "hard stop" causing an essentially instantaneous motion error, as well as a positive limit switch trip. Also assume that the interrupt mask for this axis was set so that either motion errors or limit switch trips will cause an interrupt Event motion Error & limit switch trip generates interrupt interrupting axis status returned by chipset, current axis set to interrupting axis. Host action host sends SET_I command host detects motion error & limit switch flags are set, recovers from motion error first. host sends: RST_INTRPT 00EF, clearing motion error bit host sends SET_I command
When one of these interrupt conditions occur for a particular axis, the host interrupt line is made active. At this point the host can respond to the interrupt (although the current I/O operation should be completed), but it is not required to do so When the host has completed processing the interrupt, it sends a command that clears the interrupt conditions for a particular axis, the RST_INTRPT command. This command includes a "clearing mask" as an argument, which allows one interrupt to be cleared at a time. Bits cleared by the RST_INTRPT command are the exact same bits as those cleared by non-interrupt commands such as RST_STATUS and CLR_STATUS. In each case the bits affected are the status word bits 0-7 and 11. Interrupts occur for a particular axis. If the user is currently programming parameters on axis #1 and an interrupt occurs on axis #2, it is the host's responsibility to change axis number to 2 if this is the appropriate response to an interrupt on that axis. If more than one axis interrupt condition becomes active at exactly the same time, then the axis with the lowest number will generate the interrupt first. The following host commands are used in managing interrupts: (See Host Command reference for complete information)
chipset clears motion error bit and disables host interrupt line Because limit switch interrupt is still active chipset immediately generates interrupt for limit switch interrupting axis status returned by chipset, current axis set to interrupting axis.
host detects that neg. limit switch trip flag is set, performs recovery for limit switch trip. host sends RST_INTRPT 00DF, clearing pos. limit switch bit -
chipset clears limit switch bit and disables host interrupt line
At the end of this sequence, all status bits are clear, the interrupt line is inactive, and no interrupts are pending. Note that it is not required to process multiple interrupts separately (as is shown in the example). It is perfectly valid to process 2 or more interrupt conditions at the same time, and to then send a RST_INTRPT command with a mask that clears multiple bits at the same time.
30
High Speed Position Capture
The RST_INTRPT and GET_I commands are only effective when there is an interrupt present. If no interrupt is present than alternative 'polled-mode' commands such as RST_STATUS or GET_STATUS should be used. Each axis of the MC1231A supports a high speed position capture register that allows the current axis location to be saved using an external trigger signal. When in incremental encoder mode, The MC1231A allows either the index signal or the home signal to be used as the capture trigger. These two input triggers differ however in that the index signal will cause a position capture when it, as well as the A and B index signals, transition low, while the home signal will result in a capture when it alone goes low. The commands SET_CAPT_INDEX and SET_CAPT_HOME select which input signal is used. After an index or home signal has been captured by the MC1231A, the capture value must be read by the host processor before another position capture can occur. In addition, if the index signal is being used as the trigger, the index signal,along with the A and B quadrature signals, must transition high before another index pulse can be registered. The captured position is equal to the axis position at the moment the trigger pulse was encountered. Note that the capture register is located in hardware. Its accuracy is therefore not affected by the velocity of the axis.
Encoder Position Feedback
The MC1231A-series of chipsets support direct input of incremental encoder signals. Four position input and control signals are supported: - A quadrature channel - B quadrature channel - Index pulse - Home signal The A and B signals are used to continuously maintain the position of the motor, and the index and home signals are used as trigger inputs to a high-speed position capture mechanism. Each quadrature channel consists of a square wave offset 90 deg. from the other. Positive motion consists of the A channel leading the B channel by 90 deg., and negative motion consists of the A channel lagging the B channel by 90 deg. For each full phase of one channel, four resolved quadrature counts will occur, resulting in a 4 to 1 resolution enhancement over the basic channel resolution. The index pulse is typically located on the encoder and will be active once per revolution. The chip set recognizes that an index trigger has occurred (i.e. when the 32-bit index location is captured) when the index signal, as well as the A and B signals transition low. The home signal is typically connected to a position reference sensor, or to any other general purpose synchronizing signal. The home signal is recognized when it alone transitions low. The state of the A and B signals does not affect home signal trigger recognition.
Index Pulses And Commutation
In addition to providing one of the two sources for the high speed position capture the index-signal has an additional function which is to maintain synchronization during commutation. Although this function is optional, if connected, the index signal can improve the reliability of sinusoidal commutation by eliminating any long term drift due to lost encoder counts. To utilize this function it is simply necessary to use an index pulse which occurs once per motor rotation (rotary motor), or at the same point within the commutation electrical cycle (linear motor). For more information see the section of this manual entitled "Sinusoidal Commutation".
Encoder Filtering
To enhance reliability of the received encoder information the MC1231A provides digital filtering of the quadrature data lines (A and B quadrature count) as well as the index and home signals. For all of these signals a valid high or low condition is recognized only when the condition has been maintained for 3 clock cycles of 160 nSec each (total required duration of 480 nSec) For example if a brief spurious noise signal on one of the lines occurs for 300 nSec, then this noise will be rejected until a valid state change lasting over 480nSec occurs.
Motor Outputs
The MC1231A series of chipsets provides two different motor amplifier interfaces: - 10-bit 24.5 Khz PWM interface - 16-bit DAC output. The output mode is host-selectable. The selected method affects all axes (motor output mode is not individually programmable for each axis). The host commands to select these output modes are SET_OUTPUT_PWM (to select PWM mode), and SET_OUTPUT_DAC16 (to select 16 bit DAC mode).
31
Motor Output Control The following diagram shows the control flow for the motor command output by the chipset.
Motor command register (SET_MTR_CMD)
GET_MTR_CMD
GET_BUF_MTR_CMD
MTR_OFF MTR_ON Trajectory Generator Servo filter (PID or PIVff) Sinusoidal Commutator PWM or DAC signal generator To Amp. Actual position
Retrieves the current motor command output by the chipset. When in closed loop mode this command will return the current output value of the servo filter. When in open loop mode this command will return the value set using the SET_MTR_CMD command, or SET_BUF_MTR_CMD after an UPDATE. Retrieves the buffered motor value set using the SET_BUF_MTR_CMD.
Sinusoidal Commutation
In addition to trajectory generation and servo loop closure the MC1231A chipset provides sinusoidal motor commutation of 3 and 2phase brushless motors. The following diagram shows an overview of the control flow of the sinusoidal commutation portion of the MC1231A chipset:
Motor command register (SET_MTR_CMD) Motor Output (PWM or DAC16)
Phase A command
The chipset can be run in either closed loop mode, or open loop mode. In closed loop mode the motor command is determined by the output of the servo filter, which in turn is determined by the output of the trajectory generator and the actual axis position. Closed loop mode is the normal operating mode of the chipset. Open loop mode allows the motor command to be directly set by the host. Open loop mode is typically used when one or more axes require torque control only, or to calibrate the amplifier. Whether or not the motor command comes from the servo filter (closed loop mode) or the motor command register (open loop mode), the motor command is then commutated based on the encoder position and commutation parameters specified by the host. See the section of this manual on commutation for more details. Here is a summary of the motor control commands.
MTR_OFF Target pos. & MTR_ON vel. (from profile generator) Servo filter (PID or PIVff) Actual position
Phase B command
To Amp.
Phase C command
Actual velocity (for phase advance) Actual position (if encoder-based) Actual position (from encoder)
Command MTR_ON
MTR_OFF
SET_MTR_CMD
SET_BUF_MTR_CMD
Description Enables closed loop servo control. In this mode the source of motor command is the servo filter and the motor command register has not effect. Disables closed loop servo operations. In this mode the motor command is determined by the motor command register, which is set by the host. Sets the motor command register, used to control the motor output value during open loop operations. For this command to take effect the motor must be off (MTR_OFF command). Double buffered version of SET_MTR_CMD. For this command to take effect the motor must be off (MTR_OFF command), and an UPDATE command must be given
The commutation portion of the chipset uses as input the motor command signal from either the servo filter, or the motor command register (depending on whether the chipset is in closed loop or open loop mode). This pre-commutated command signal is then multiplied by commutation values derived from an internal lookup Sin/Cos table. The commutation angle used in the Sin/Cos lookup is determined by the position encoder as well as parameters set by the host processor which relate the specific encoder used to the motor magnetic poles. Two commutation waveforms are provided, one appropriate for 3-phase devices with 120 deg. separation between phases (such as brushless motors), and one appropriate for 2-phase devices with 90 deg. separation between phases (such as stepper motors). Other features of the MC1231A chipset are the ability to use Hallsensor inputs for phase initialization, to use an index pulse to maintain commutation synchronization, to pre-scale the encoder input to support a wider variety of feedback devices, and to provide velocity-based phase advance for smoother and more efficient high speed operation.
32
where: Commutation Waveforms The MC1231A supports two commutation waveforms, a 120 degree offset waveform appropriate for 3-phase brushless motors, and a 90degree offset waveform appropriate for 2-phase brushless motors. To specify the 3-phase brushless waveform the command SET_PHASE_3 is used, and to set it for 2-phase brushless motors the command SET_PHASE_2 is used. Depending on the waveform selected, as well as the motor output mode selected (PWM or DAC16), either 2 or 3 commutated output signals per axis will be provided by the chipset. The following chart shows this. Waveform 3-phase 3-phase 2-phase 2-phase Motor Output Mode PWM DAC16 PWM DAC16 # of Output signals & Name 3 (A, B, C) 2 (A, B) 2 (A, B) 2 (A, B) Counts_per_rot is the # of enc. counts per motor rotation N_poles is the number of motor poles The command used to set the number of encoder counts per electrical cycle is SET_PHASE_CNTS. To read back this value use the command GET_PHASE_CNTS. The smallest allowed value for the number of counts per electrical cycle is 129 (decimal).
Index Pulse Referencing To enhance long term commutation reliability the MC1231A provides the ability to utilize an index pulse input from the motor encoder as a reference point during commutation. By using an index pulse during the phase calculations any long term loss of encoder counts which might otherwise affect the accuracy of the commutation are automatically eliminated. To utilize index pulse referencing the motor encoder chosen must provide an index pulse signal to the chipset once per rotation. This index pulse is connected to the chipset using the Index signal of the I/O chip (see Pin Descriptions section for more information). Index pulse referencing is recommended for all rotary brushless motors with quadrature encoders. For linear brushless motors it is generally not used, although it can be used as long as the index pulses are arranged so that each pulse occurs at the same phase angle within the commutation cycle. When using an index pulse the number of encoder counts per electrical cycle is not required to be an exact integer. In the case that this value is not an integer, the nearest integer should be chosen. Conversely, if index pulses are not being used then the number of counts per electrical cycle must be an exact integer, with no remainder.
For specific pin assignments of the PWM and DAC16 motor output signals see the section of this manual entitled 'Pin Descriptions'. The diagram below shows the phase A, B, and C commutation signals for a 3-phase brushless motor, and the phase A and phase B signals for a 2-phase brushless motor.
3-Phase Brushless
Phase A Phase B Phase C
120 Deg
2-Phase Brushless
Phase A Phase B
90 Deg
For example if a 6-pole brushless motor is to be used with an encoder without an index pulse than an encoder with 1200 counts per rotation would be an appropriate choice, but an encoder with 1024 would not because 1024 can not be divided by 3 evenly. Index pulse referencing is performed automatically by the chipset, regardless of the initialization scheme used (algorithmic, Hallbased, microstepping, or direct set).
90
180
270
360
Commutation Parameters To perform sinusoidal commutation it is necessary to specify the # of encoder counts per electrical cycle. To determine this value the # of magnetic poles on the motor, along with the number of encoder counts per motor revolution must be known. Knowing these two quantities the number of encoder counts per electrical cycle is given by the following equation: Counts_per_cycle = 2*Counts_per_rot/N_poles
33
Commutation Error Detection With an index signal properly installed the chipset will automatically correct any small losses of encoder counts that may occur. If the loss of encoder counts becomes excessive however, or if the index pulse does not arrive at the expected location within the commutation cycle, a "commutation error" is said to occur. Commutation errors are caused by a number of circumstances. The most common are listed below: - noise on the A or B encoder lines - noise on the index line - incorrect setting of # encoder counts per electrical cycle For each instance that a commutation error occurs phase referencing will not occur for that index pulse. Depending on the cause of the error the commutation error may be a one-time event, or may occur essentially continuously after the first event. When a commutation error occurs bit # 11 of the status word is set high (1). This condition can also be used as a source of host interrupts so the host can be automatically notified of a commutation error. To recover from a commutation error this bit is cleared by the host, however depending on the nature of the error it is possible that commutation errors will continue to be generated. A commutation error may indicate a serious problem with the motion system, potentially resulting in unsafe motion. It is the responsibility of the host to determine and correct the cause of commutation errors.
SET_PHASE_TIME. To read back this value use the command GET_PHASE_TIME. To minimize the impact on the system mechanics this method utilizes a motor command value set by the host processor to determine the overall amount of power to "inject" into the motor during phase initialization Typically, the amount of power to inject should be in the range of 5 - 25 % of full scale output, but in any case should be at least 3 times the breakaway stiction torque. For best results the initialization motor command value can be determined experimentally. The command used to set the motor output level is SET_BUF_MTR_CMD. To read back this value use the command GET_BUF_MTR_CMD. To execute the initialization procedure, the host command INIT_PHASE is used. Upon executing this command, the phasing procedure will immediately be executed. Before the phase initialization command is given however (INIT_PHASE command), the motor must be turned off (MTR_OFF command), a motor command output must be specified (SET_BUF_MTR_CMD command), and an initialization duration must be specified (SET_PHASE_TIME command). During algorithmic phase initialization the motor may move suddenly in either direction. Proper safety precautions should be taken to prevent damage from this movement. In addition, to provide accurate results motor movement must be unobstructed in both directions and must not experience excessive stiction.
Hall-Based Phase Initialization To set the chipset for Hall-based initialization use the command SET_PHASE_HALL In this mode 3 Hall-Sensor signals are used to initially determine the motor phasing, and sinusoidal commutation begins automatically after the motor has moved through one full rotation. The Hall-Sensor signals are fed back to the chipset through the signals Hall1A-C (axis #1) and Hall2A-C (axis # 2). Care should be taken to connect these sensors properly. To read the current status of the hall sensors use the command GET_HALLS. The following diagram shows the relationship between the state of the three Hall sensor inputs for each axis and the commutated motor outputs. This graph shows the expected Hall sensor states and winding excitation for forward motion (increasing position).
Phase Initialization After startup the chipset must determine the proper commutation angle of the motor relative to the encoder position. This information is determined using a procedure called phase initialization. The chipset provides four methods to perform phase initialization; algorithmic, Hall Sensor-based, microstepping, and direct-set. Algorithmic Phase Initialization To set the chipset for algorithmic initialization use the command SET_PHASE_ALGOR In the algorithmic initialization mode no additional motor sensors beyond the position encoder are required. To determine the phasing the chipset performs a sequence which briefly stimulates the motor windings, and sets the initial phasing using the observed motor response. From the resulting motion the chipset can automatically determine the correct motor phasing. Depending on the size and speed of the motor, the time between the start of motor phasing and the motor coming to a complete rest (settling time) will vary. To accommodate these differences the amount of time to wait for the motor to settle is programmable using the command
34
3-Phase Brushless
Phase A Phase B Phase C
the index pulse is encountered the phase angle can be set using the command SET_PHASE. To operate the motor in microstepping mode the motor must be set on (MTR_ON command), and a motor output value must be provided (SET_BUF_MTR_CMD & UPDATE). In addition the # of encoder counts per electrical cycle should be set to 512. When in microstepping mode each trajectory 'count' corresponds to 1/256 of a full electrical cycle. For example using a 4-pole motor (2 electrical cycles per motor rotation) a trajectory move of 512 counts will move the motor 1 full motor rotation. Special care should be taken when initializing the motor using the microstepping method. Because the motor is operated 'open-loop' the resultant coil energization and subsequent rotation may be jerky and abrupt.
Hall A Hall B Hall C
90
180
270
360
Unlike the algorithmic method, using Hall-based phase initialization no special motor procedures are required. Initialization is performed using the command INIT_PHASE, and occurs immediately, without any motor motion. To accommodate varying types of Hall sensors, or sensors that contain inverter circuitry, the signal level/logic interpretation of the Hall sensor input signals can be set through the host. The command SET_HALL_SENSE accepts a bit-programmed word which controls whether the incoming Hall signals are interpreted as active high, or active low. To read back this Hall interpretation value use the command GET_HALL_SENSE. For details on the programming of this control word see the Command Reference section of this manual. Hall-based initialization should only be used with a 3-phase commutation waveform, and with Hall sensors located 120 degrees apart. Hall-sensors located 60 degrees apart should not be used.
Phase initialization using the microstepping method should only be used under special circumstances. It is not generally recommended unless the algorithmic or Hall-based methods can not be used.
Direct-Set Phase Initialization If, after power-up the location of the motor phasing is known explicitly the phase angle can simply be set directly using the SET_PHASE command. This typically occurs when sensors such as resolvers are used where the returned motor position information is absolute in nature (not incremental) , and can be used to generate a quadrature data stream as well as be read by the host directly.
Phase Initialization Programming The following examples show typical host command sequences to initialize the commutation of a brushless motor for all four initialization methods.
Microstepping Phase Initialization If the location of the index pulse in relation to the motor rotor and case is known then it may be advantageous to use an initialization technique which operates the motor as a microstepper, rotating the motor until the index pulse is found, and then setting the phase angle explicitly. This scheme is only appropriate for motors which have the index pulse in a fixed and repeatable location within the commutation cycle for all of the motors to be used during manufacturing of the product. Although this is relatively uncommon, it is typical for motors with optical Hallsensors which use a single disk containing the A, B, index, and Hall sensor information. To set the chipset for microstepping operation the command SET_PHASE_MICRO is used. To restore the chipset for encoderbased commutation the command SET_PHASE_ENC is used. Once
Algorithmic Initialization Sequence SET_PHASE_CNTS uuuu SET_PHASE_ALGOR MTR_OFF SET_PHASE_TIME wwww SET_BUF_MTR_CMD xxxx INIT_PHASE Set # of encoder counts per electrical cycle Set phase initialization method to algorithmic Turn motor off so it doesn't conflict with initialization procedure Set algorithmic phase init duration Set initialization motor command level Perform the initialization
This sequence will cause the motor to immediately begin the initialization procedure, which will last 'wwww' servo loops long. To determine if the procedure is completed, the command
35
GET_PHASE_INFO can be used. The 'phase initialization not completed' bit will indicate when the procedure is finished. After the initialization procedure is completed the motor should be enabled (MTR_ON cmd) if the chipset is to be run in closed loop mode.
Direct-Set Initialization Sequence SET_PHASE_CNTS xxxx SET_PHASE xxxx Set # of encoder counts per electrical cycle (hex) Set phase angle based on information from external sensor
Hall-based Initialization Sequence SET_PHASE_CNTS uuuu SET_HALL_SENSE vvvv SET_PHASE_HALL INIT_PHASE Set # of encoder counts per electrical cycle Set Hall sensor signal interpretation Set phase initialization method to Hall-sensor based Perform the initialization This sequence will directly set the phase angle to a value determined by another sensor. The set value must be between 0 and the # of encoder counts per electrical cycle.
Adjusting The Commutation Angle The MC1231A supports the ability to change the motor's commutation angle directly, both when the motor is stationary and when it is in motion. Although this is not generally required it can be useful during testing, or during commutation initialization when the microstepping or direct-set methods are used. To change the commutation angle when the motor is stationary use the command SET_PHASE. To change the commutation angle while the motor is moving the index pulse is required, and a different command, SET_PHASE_OFFSET, is used which only takes effect when an index pulse occurs. The following description provides some background on this function. After phase initialization has occurred the correct commutation angle is stored by the chipset as the offset from the index mark (in encoder counts) to the phase A maximum output value (commutation 'zero' location). This 16-bit offset register can be read using the command GET_PHASE_OFFSET. The following chart shows the relationship between the phase A commutation 'zero' location, the index location, and the phase offset value. For a given motor the index pulse shown in this figure could have been located anywhere within the phase cycle since it will usually vary in position from motor to motor. Only motors that have been mechanically assembled such that the index position is referenced to the motor windings will have a consistent index position relative to the commutation zero location.
Phase Offset
This sequence will cause the chipset to read the Hall sensor signals and initialize the phasing immediately. The motor will not move as a result of this sequence, and no delay is required for further motor operations to be performed.
Microstepping Initialization Sequence SET_PHASE_CNTS 512 SET_PHASE_MICRO SET_CAPT_INDEX CLR_STATUS GET_CAPT MTR_ON SET_BUF_MTR_CMD xxxx SET_POS 560 Set # of encoder counts per electrical cycle to 512 (dec.) Set chipset for microstepping mode Set capture mode to index (not necessary if already so set) Clear axis status Clear out any previous captures Turn motor on (not necessary if already on) Set motor command value Set rotation distance a bit more than 1 full motor rotation (assuming 4-pole motor Set velocity Set acceleration start the motion
SET_VEL yyyy SET_ACC zzzz UPDATE
This sequence will cause the motor to make a move of somewhat more than 1 rotation. After the update the host should poll the status word (GET_STATUS cmd) until a capture occurs and then immediately send a SET_PHASE command, followed by a SET_PHASE_OFFSET command, each loaded with the phase angle required to init. the phasing. See the following section of this manual entitled "Adjusting the commutation angle" for more information on determining the correct phase set value. Once the SET_PHASE and SET_PHASE_OFFSET commands have been sent by the host the chipset should be initialized for normal commutation operation. This means the phasing mode should be set to encoder-based (SET_PHASE_ENC cmd.) and the correct # of encoder counts per electrical cycle should be set (SET_PHASE_CNTS cmd.)
Commutation 'Zero' Location
Phase A Waveform
Index Pulse 90 180 270 360
Before phase initialization has occurred the phase offset register will have a value of ffff (hex). Once phase initialization has occurred and the motor has been rotated such that at least one index pulse has been
36
received, the phase offset value will be stored as a positive number with a value between 0 and the number of encoder counts per electrical cycle. To convert the phase offset value which is in encoder counts to degrees the following expression can be used: Offsetdegrees = 360 * Offsetcounts/counts_per_cycle where: Offsetdegrees is the phase offset in degrees Offsetcounts is the phase offset in encoder counts counts_per_cycle is the # of counts per electrical cycle set using the SET_PHASE_CNTS command The phase offset value can also be changed any number of times while the motor is in motion, although only relatively small changes should be made to avoid sudden jumps in the motor motion. The SET_PHASE_OFFSET and GET_PHASE_OFFSET commands can only be used when an index pulse from the encoder is connected. If no index pulse is used the phase offset angle can not be adjusted or read back by the host Setting the phase offset value does not change the relative phasing of phase B and C to phase A These phases are still set at either 90 or 120 degree offsets from phase A (depending on the waveform chosen).
Velocity-Based Phase Advance Because of inductance and magnetic field setup delays a lag may exist between the motor command signals from the chipset and the desired magnetic field in the motor. This lag can reduce the efficiency and maximum velocity of the motor. To compensate for this effect the MC1231A chipsets provide the ability to advance the commutation phase of the motor during rotation so that the actual magnetic field experienced by the motor more closely resembles the optimum values. The phase advance value is determined by a combination of the motor velocity, and a phase advance gain value specified by the host. The phase advance value is calculated as follows: phase_advance = motor_velocity * KPHASE/1000 where: phase_advance is in units of encoder counts motor_velocity is in units of encoder counts/sample time KPHASE is the host-specified gain phase advance gain
Phase Info Status Word
A status word is available that indicates the current value of various phasing-related conditions. The phase information status word is a 16-bit register which can be queried using the command GET_PHASE_INFO. It contains the following information (Bit encoding is 0 = LSB, 15 = MSB): Bit # 0 Description Phase initialization mode. This bit will be set to 1 if the initialization mode is hall-based, 0 if the initialization mode is algorithmic. used internally by chipset (may be 0 or 1) Commutation mode. This bit indicates whether the commutation mode has been set to microstepping (SET_PHASE_MICRO cmd) or encoder-based (SET_PHASE_ENC cmd). A 1 indicates microstepping mode. Waveform. This bit indicates whether the output waveform is 3-phase (0) or 2-phase (1) Used internally by chipset (may be 0 or 1) Prescalar status. This bit indicates whether the prescalar is active. A 1 indicates it is active. Phase initialization not completed. This bit indicates that phase initialization has not been completed yet. A 1 indicates that initialization has not been completed. used internally by chipset may be 0 or 1) Unused (set to 0)
Encoder Pre-Scalar Particularly when used with linear motors, the range in the value of the # of encoder counts per electrical cycle can vary widely. Typical rotary motors can have a value between 129 and 32,767. Linear brushless motors however can have values of 1,000,000 counts per cycle or higher because they often use high accuracy laser-based encoders. To accommodate this large range the MC1231A series chips support a prescalar function which, for the purposes of commutation calculations, divides the incoming encoder counts by 64. With the prescalar enabled the max range for the number of encoder counts per electrical cycle is 2,097,088. To enable the prescalar use the command SET_PRESCALE_ON. To disable the prescalar use the command SET_PRESCALE_OFF. The prescalar function should not be enabled or disabled once the motor has been put in motion. The prescalar function only affects the commutation of the chipset. It does not affect the position used during servo filtering, or requested by the command GET_ACTL_POS.
1 2
3 4-6 7 8
9 10-15
37
Commutation Command Summary: The following table summarizes the commands that are used in conjunction with sinusoidal commutation: Command SET_PHASE_3 SET_PHASE_2 SET_PHASE_HALL SET_PHASE_ALGOR SET_PHASE_ENC SET_PHASE_MICRO PRESCALE_ON PRESCALE_OFF SET_PHASE_CNTS SET_PHASE_TIME SET_PHASE SET_PHASE_OFFSET SET_KPHASE SET_HALL_SENSE INIT_PHASE GET_PHASE_INFO GET_PHASE_CNTS GET_PHASE_TIME GET_PHASE_OFFSET GET_KPHASE GET_HALL_SENSE GET_HALLS GET_PHASE Function Sets the commutation waveform for 3phase brushless motors. Sets the commutation waveform for 2phase brushless motors. Sets the phase initialization mode to Hall-sensor-based Sets the phase initialization mode to algorithmic. Sets commutation mode to encoderbased Sets commutation mode to microstepping Sets the encoder prescalar on Sets the encoder prescalar off Sets the # of encoder counts per commutation electrical cycle. Sets the amount of time to wait during phase initialization Sets the current phase angle Sets the phase offset angle Sets the velocity phase advance gain Sets the logic level interpretation for the Hall sensor inputs Begins the algorithmic phase initialization procedure. Returns various commutation-related state information set by the host Returns the number of encoder counts per electrical cycle Returns the wait time used during phase initialization Returns the phase offset angle Returns the phase advance gain Returns the logic level interpretation for the Hall sensor inputs Returns the status of the hall sensors Returns the current commutation angle.
Brushless Motor (PWM Mode) Connection Scheme
Amplifiers Axis #1 phase A Axis #1 Phase B Axis #1 Phase C MC1231 Axis #2 phase A Axis #2 Phase B Axis #2 Phase C Mtr #2 Mtr #1
In this configuration the chipset outputs 3 phased PWM magnitude signals per axis. These signals are then fed directly into 3 half-bridge type voltage amplifiers. Below is shown a typical amplifier configuration for a 3-phase brushless motor using the DAC output mode:
Brushless Motor (DAC Mode) Connection Scheme
Amplifiers DAC 1A Axis #1 C=-(A+B) DAC 1B MC1231 DAC 2A Axis #2 C=-(A+B) DAC 2B Axis #2 phase A Axis #2 Phase B Axis #2 Phase C Mtr #2 Axis #1 phase A Axis #1 Phase B Axis #1 Phase C Mtr #1
When using DAC output mode the digital word provided by the chipset must first be converted into a voltage using an external DAC. Two DAC channels are required per axis. To construct the third phase for a brushless motor (C phase) the sum of the A and B signals must be 'negated' using C = -(A+B). This is usually accomplished with an Op-amp circuit. In addition, if current loop control is desired the three output signals are usually arranged so that the sum of the currents flowing through the windings of the motor are zero.
Motor Output Signal Interpretation The following graph shows the desired output voltage waveform for a single phase.
+ motor command
Motor Output Configuration The MC1231A series of chipsets supports two motor output methods, PWM and DAC (up to 16 bit resolution). Below is shown a typical amplifier configuration for a 3-phase brushless motor using the PWM output mode:
0
- motor command
38
The waveform is centered around a value of 0 volts. The magnitude of the generated waveform is proportional to either the output of the servo filter or the motor command register (depending on the commutation mode and motor on/off status). For example if the chipset is connected to a DAC with output range of 10 Volts to + 10 Volts and the chipset is set to open loop mode with a motor command value of 32,767 (which is the maximum allowed value) than as the motor rotates through a full electrical cycle, a sinusoidal waveform centered at 0 volts will be output with a minimum voltage of 10, and a maximum voltage of +10.
0/1024 1 (max. neg. 0 value) 512/1024 (0 value) 1 0
1024/1024 1 (max. pos. value) 0
DAC16 Decoding The digital values output by the chipset to the DAC encode the desired voltages as a 16-bit digital word. The minimum voltage is output as a digital word value of 0, a voltage of 0 Volts is output as a digital word of 32,768 (dec.), and the maximum positive voltage is output as a digital word value of 65,535. To load each of the four (MC1231A) or two (MC1131A) DACs, the DAC control pins in combination with the chipset's 16-bit data bus are used. To load a particular DAC, The DAC address (1 of 4) is output on the signals DAC16Addr0-1, the 16 bits of DAC data are output on pins Data0-11 (high 12 bits), as well as DACLow0-3 (low 4 bits), I/OAddr0-3 and DACSlct are high, and I/OWrite is low. For more information on the DAC signal timing & conditions, see the Pin Descriptions and timing diagrams section of this manual. DACs with lower resolution than 16 bits can also be used. To connect to a DAC with less resolution, the high order bits of the 16-bit data word should be used. For example, to connect to an 8-bit DAC, bits Data4Data11 should be used. The low order 8 bits are written to by the chipset, but ignored by the DAC circuitry.
An output pulse width of 0 parts per 1,024 represents the maximum negative voltage, an output pulse width of 512 per 1,024 (50 %) represents a voltage of 0, and a pulse width of 1,024 per 1,024 represents the maximum positive voltage. This PWM scheme has been chosen to allow convenient interfacing to half bridge type amplifiers by connecting the PWM output to a level shifter circuit , and using this output to drive the high and low side drivers of the bridge.
PWM Decoding The PWM output mode also outputs a sinusoidal desired voltage waveform for each phase, however the method by which these signals encode the voltage differ substantially from the DAC16 digital word. The PWM output mode uses a single signal per output motor phase. This signal contains a pulse-width encoded representation of the desired voltage. In this encoding the duty cycle of the waveform determines the desired voltage. The PWM cycle has a frequency of 24.5 kHz, with a resolution of 10 bits, or 1/1,024. The following chart shows the encoding.
39
Command Summary
Command Mnemonic Axis Control SET_1 SET_2 SET_I Profile Generation SET_PRFL_S_CRV SET_PRFL_TRAP SET_PRFL_VEL SET_PRFL_GEAR SET_POS SET_VEL SET_ACC SET_MAX_ACC SET_JERK SET_RATIO STOP/CLR_PRFL SMOOTH_STOP SYNCH_PRFL GET_POS GET_VEL GET_ACC GET_MAX_ACC GET_JERK GET_RATIO GET_TRGT_POS GET_TRGT_VEL Digital Filter SET_KP SET_KD SET_KI SET_KVFF SET_I_LM SET_MTR_LMT SET_MTR_BIAS SET_POS_ERR GET_KP GET_KD GET_KI GET_KVFF GET_I_LM GET_MTR_LMT GET_MTR_BIAS GET_POS_ERR GET_INTGR GET_ACTL_POS_ERR SET_AUTO_STOP_ON SET_AUTO_STOP_OFF Parameter Update SET_TIME_BRK SET_POS_BRK SET_NEG_BRK SET_ACTL_POS_BRK SET_ACTL_NEG_BRK SET_MTN_CMPLT_BRK SET_EXT_BRK SET_BRK_OFF SET_BRK_PNT UPDATE MULTI_UPDATE SET_AUTO_UPDATE_ON SET_AUTO_UPDATE_OFF GET_BRK_PNT Code (hex) 01 02 08 0b 09 0a 0c 10 11 12 15 13 14 46 4e 47 4a 4b 4c 4f 58 59 1d 1e 25 27 26 2b 28 06 0f 29 50 52 51 54 53 07 2d 55 2e 60 45 44 17 18 19 1b 1c 35 5e 6d 16 1a 5b 5c 5d 57 Available on all axes all axes all axes all axes all axes all axes 1 all axes all axes all axes all axes all axes 1 all axes all axes all axes all axes all axes all axes all axes all axes 1 all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes Axes acted on Double Buffered no no no no yes yes yes yes yes yes yes yes yes yes yes yes yes yes no no no no no no no no no no no no no no no no # data words /direction 1/read 1/read 1/read 0 0 0 0 2/write 2/write 2/write 1/write 2/write 2/write 0 0 0 2/read 2/read 2/read 1/read 2/read 2/read 2/read 2/read 1/write 1/write 1/write 1/write 1/write 1/write 1/write 1/write 1/read 1/read 1/read 1/read 1/read 1/read 1/read 1/read 1/read 1/read 0 0 0 0 0 0 0 0 0 0 2/write 0 1/write 0 0 2/read Description set by cmd. set by cmd. interrupting axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis set by mask current axis current axis current axis Set current axis # to 1 Set current axis # to 2 Set current axis # to the interrupting axis Set profile mode to S-curve Set profile mode to trapezoidal point to point Set profile mode to velocity-contouring Set profile mode to electronic gear Set command position Set command velocity Set command acceleration Set max acceleration (S-curve profile only) Set command jerk Set command electronic gear ratio Abruptly stop current axis trajectory motion Smoothly stop current axis trajectory motion Set target position equal to actual position Get command position Get command velocity Get command acceleration Get max. acceleration (S-curve profile only) Get command jerk Get command electronic gear rate Get current target position Get current target velocity Set proportional gain Set derivative gain Set integral gain Set feedforward gain Set integration limit Set motor output limit Set motor output bias Set maximum position error limit Get proportional gain Get derivative gain Get integral gain Get velocity feedforward gain Get integration limit Get motor output limit Get motor output bias Get position error Get integrated position error value Get actual position error Set auto stop on motion error mode on Set auto stop on motion error mode off Set breakpoint mode to time Set breakpoint mode to pos. target position Set breakpoint mode to neg. target position Set breakpoint mode to pos. actual position Set breakpoint mode to neg. actual position Set breakpoint mode to motion complete Set breakpoint mode to external Set breakpoint mode off Set breakpoint comparison value Immediate parameter update Multiple axis immediate parameter update Set automatic profile update on Set automatic profile update off Get breakpoint comparison value
40
Command Mnemonic Interrupt Processing SET_INTRPT_MASK GET_INTRPT RST_INTRPT GET_INTRPT_MASK Status/Mode CLR_STATUS RST_STATUS GET_STATUS GET_MODE Encoder SET_CAPT_INDEX SET_CAPT_HOME GET_CAPT Motor SET_OUTPUT_PWM SET_OUTPUT_DAC16 MTR_ON MTR_OFF SET_MTR_CMD GET_MTR_CMD SET_BUF_MTR_CMD GET_OUTPUT_MODE GET_BUF_MTR_CMD Miscellaneous AXIS_ON AXIS_OFF SET_ACTL_POS GET_ACTL_POS SET_LMT_SENSE GET_LMT_SWTCH LMTS_ON LMTS_OFF GET_HOME SET_SMPL_TIME GET_SMPL_TIME RESET GET_VRSN GET_TIME Commutation SET_PHASE_3 SET_PHASE_2 SET_PHASE_HALL SET_PHASE_ALGOR SET_PHASE_ENC SET_PHASE_MICRO PRESCALE_ON PRESCALE_OFF SET_PHASE_CNTS SET_PHASE_TIME SET_PHASE_OFFSET SET_KPHASE SET_HALL_SENSE SET_PHASE INIT_PHASE GET_PHASE_INFO GET_PHASE_CNTS GET_PHASE_TIME GET_PHASE_OFFSET GET_KPHASE GET_HALL_SENSE GET_HALLS GET_PHASE
Code ( hex) 2f 30 32 56 33 34 31 48 64 65 36 3c 3b 43 42 62 3a 77 6e 69 41 40 4d 37 66 67 70 71 05 38 61 39 6c 3e 73 74 78 79 5f 63 0d 0e 75 72 76 1f 23 84 7a 7f 7d 7c 7b 20 24 7e 2c
Available on all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes all axes
Axis acted on
Double Buffered no no no no no no no no no no no yes no no no no no no no no no no no no no no no no no no no no no no no -
# data words /direction 1/write 1/read 1/write 1/read 0 1/write 1/read 1/read 0 0 2/read 0 0 0 0 1/write 1/read 1/write 1/read 1/read 0 0 2/write 2/read 1/write 1/read 0 0 1/read 1/write 1/read 0 1/read 2/read 0 0 0 0 0 0 0 0 1/write 1/write 1/write 1/write 1/write 1/write 0 1/read 1/read 1/read 1/read 1/read 1/read 1/read 1/read
Description
current axis interrupting axis interrupting axis current axis current axis current axis current axis current axis current axis current axis current axis global global current axis current axis current axis current axis current axis global current axis current axis current axis current axis current axis global global global global global global global global global global current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis current axis global current axis current axis current axis current xais current axis current axis current axis global global current axis
Set interrupt mask Get status of interrupting axis Reset interrupting events Get interrupt mask Reset status of current axis Reset events for current axis Get axis status word Get axis mode word Set index signal as position capture trigger Set home signal as position capture trigger Get current axis position capture location Set motor output mode to PWM Set motor output mode to 16-bit DAC Enable motor output Disable motor output Write direct value to motor output Read motor output command Write double buffered motor command output Get current output mode Get double buffered motor command value Enable axis Disable axis Set current actual axis location Get current actual axis location Set limit switch bit sense Get state of limit switches Set limit switch sensing on Set limit switch sensing off Get state of home switches Set servo loop sample time Get servo loop sample time Reset chipset Get chipset software version information Get current chip set time (# servo loops) Set waveform to 3-phase Set waveform to 2-phase Set phase initialization to Hall-based Set phase initialization to algorithmic Set commutation mode to encoder-based Set commutation mode to microstepping Set encoder prescale on Set encoder prescale off Set # of encdr counts per commutation cycle Set amount of time to wait after phase init. Set phase offset value Set velocity phase advance gain Set Hall-sensor logic level interpretation Set current commutation phase angle Perform phase initialization procedure Get commutation flags set by host Get # of encdr counts per commutation cycle Get amount of time to wait after phase init Get phase offset value Get velocity phase advance gain Get Hall-sensor logic level interpretation Get state of Hall sensors Get current commutation phase angle
41
Command Reference
Each command consists of a single byte, with a command code value as described in the "encoding" description for each command. Data is transmitted to/from the chip set in 16-bit words. All data is encoded "high to low" i.e. each 16-bit word is encoded high byte first, low byte second, and two word data values are encoded high word first, low word second. Signed data is represented in two's complement format. In the case of 32-bit quantities, the entire 32-bit number is two's complemented. For example to transmit the decimal number 1,234,567, which has a hexadecimal representation of 12d687, the high word is sent first (12 hex) and then the low word is sent (d687 hex). Negative numbers are treated in the same way. For example to transmit the decimal number -746,455 , which has a hexadecimal value of fff49c29, then the high word is transmitted first (fff4 hex.) followed by the low word (9c29 hex.). Some chipset quantities such as position are provided with `unity scaling', meaning that the value provided is used by the chipset without internal scaling. Other chipset quantities are scaled by various constants to allow a more useful operating range. The non-unity scaling constants that are used by the chipset are either 1/216 or 1/232 . If 1/216 scaling is used then the chipset expects a number which has been scaled by a factor of 65,536 from the `user' units. For example to specify a velocity (SET_VEL command) of 2.75 counts/sample time, 2.75 is multiplied by 65,536 and the result is sent to the chipset as a 32 bit integer (180,224 dec. or 2c000 hex.). 1/216 scaling is used with 16 bit as well as 32 bit quantities. The size of the data word does not affect how the scaling is performed. If 1/232 scaling is indicated the chipset expects a number which has been scaled by a factor of 4,294,967,296. For example to specify a jerk value (SET_JERK command) of .0075 counts/sample time3, .0075 is multiplied by 4,294,967,296 and the result is sent to the chipset as a 32 bit integer (32,212,256 dec. or 1eb8520 hex). All transmissions to/from the chip set are checksummed. The checksum is a 16-bit quantity that can be read at the end of each command transmission. The checksum value consists of the 16-bit sum of all 16-bit transmissions to or from the chip set, including the command byte which occupies the low byte of the first 16-bit transmission word. For example if a SET_VEL command (which takes two 16-bit words of data) was sent with a data value of fedcba98 (hex), the checksum would be: 0011 (code for SET_VEL command) + fedc (high data word) + ba98 (low data word) ---------1b985 check sum = b985 (keep bottom 16 bits only)
The following hex code commands are reserved for future use, or are currently used during manufacturing/test. They return a valid checksum, although they should not be used during normal chipset operations. The hex command codes are: 49, 4e The following hex code commands are illegal, and will return a checksum of 0. They should not be used during normal chipset operations. The hex command codes are: 00, 03, 04, 22, 3d, 80, 81, 82, 83, 85 through ff Unless otherwise noted, all numerical values presented in this command summary are in decimal.
Axis Control
SET_1 Data/direction: Encoding: Axis acted on: Available on: Double buffered: Set current axis to #1 1/read 01 (hex) set by command all axes No
SET_1 changes the current axis number to 1. All commands that operate on the current axis will be affected by this command. The status of axis #1 is returned. See GET_STATUS command for the status word format.
SET_2 Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set current axis to #2 1/read 02 (hex) set by command all axes No
SET_2 changes the current axis number to 2. All commands that operate on the current axis will be affected by this command. The status of the axis #2 is returned. See GET_STATUS command for the status word format.
SET_I Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set current axis to interrupting axis 1/read 08 (hex) interrupting axis all axes No
SET_I changes the current axis number to the interrupting axis, which is the axis that has caused the host interrupt to become active. All commands that operate on the current axis will be affected by this command. The status of the interrupting axis is returned. See GET_STATUS command for the status word format.
42
Profile Generation
SET_PRFL_S_CRV Data/direction: Encoding: Axis acted on: Available on: Double buffered: Set profile mode to S-curve point to point none 0b (hex) current axis all axes No
SET_PRFL_VEL Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set profile mode to velocity contouring. none 0a (hex) current axis all axes No
SET_PRFL_S_CRV sets the trajectory profile mode to S-curve point to point. In this mode, the host specifies the destination position (SET_POS cmd), the maximum velocity (SET_VEL cmd) the maximum acceleration (SET_MAX_ACC cmd), and the jerk (SET_JERK cmd). Once in this mode, the trajectory profile generator will drive the axis to the destination position at the specified jerk while not exceeding the maximum velocity and max. acceleration. The axis will stay in this profile mode until another profile mode is explicitly set. While in this profile mode, no parameters should be changed while the axis is in motion. Before setting the current profile mode to S-curve point to point, the axis should be completely at rest.
SET_PRFL_VEL sets the trajectory profile mode to velocity contouring. In this mode the host specifies the command acceleration (SET_ACC cmd), and the maximum velocity (SET_VEL cmd). Once in this mode, the trajectory profile generator will drive the axis at the specified acceleration while not exceeding the maximum velocity. The acceleration and the maximum velocity may be changed on the fly. The axis will stay in this profile mode until another profile mode is explicitly set. There are no limitations on changing the profile mode to velocity contouring while the axis is in motion. There are no host-specified limits on the position in this mode. It is the responsibility of the host to specify profile parameters that maintain the axis within safe position limits.
SET_PRFL_TRAP Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set profile mode to trapezoidal point to point none 09 (hex) current axis all axes No
SET_PRFL_GEAR Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set profile mode to electronic gear none 0c (hex) current axis axis #1, #2 (see chart) No
SET_PRFL_TRAP sets the trajectory profile mode to trapezoidal point to point. In this mode, the host specifies the destination position (SET_POS cmd), the maximum velocity (SET_VEL cmd) and the acceleration (SET_ACC cmd). Once in this mode, the trajectory profile generator will drive the axis to the destination position at the specified acceleration while not exceeding the maximum velocity. Position and velocity may be changed on the fly when in this profile mode; acceleration may not. The axis will stay in this profile mode until another profile mode is explicitly set. Before setting the current profile mode to trapezoidal point to point, the axis should be completely at rest. While in this mode, the acceleration should not be changed until the axis has come to a stop.
SET_PRFL_GEAR, sets the trajectory profile mode to electronic gear. In this mode the host specifies the gear ratio (SET_RATIO cmd). Once in this mode the trajectory profile generator will drive the current (slave) axis to the position specified by the master axis factored by the specified gear ratio. The gear ratio may be changed on the fly. The axis will stay in this profile mode until another profile mode is explicitly set. The electronic gear mode is available on the following axis for each chipset: chipset p/n MC1231A MC1131A gear pairs (master -> slave) #2 -> #1 not available
There are no host-specified limits to axis motion in this mode. It is the responsibility of the host to specify a gear ratio that maintains the axis within safe motion limits.
SET_POS Data/direction Encoding: Axis acted on: Available on: Double buffered:
Set command position 2/write 10 (hex) current axis all axes yes
SET_POS sets the final position used during the S-curve and trapezoidal trajectory profile generator modes. The position is specified as a signed 32-bit number with units of counts. The range is
43
-1,073,741,824 to 1,073,741,823. The loaded position is not utilized until a parameter update occurs.
SET_VEL Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set command velocity 2/write 11 (hex) current axis all axes yes
SET_JERK Data written: Data read: Encoding: Axis acted on: Available on: Double buffered:
Set command jerk 2 words none 13 (hex) current axis all axes yes
SET_VEL sets the maximum velocity magnitude used during the Scurve, trapezoidal, and velocity contouring profile modes. The velocity is specified as an unsigned 32-bit number with units of counts/sample. The data word scaling is 1/216. The range is 0 to +1,073,741,823. The loaded velocity is not utilized until a parameter update occurs.
SET_JERK sets the command jerk used during the S-curve profile generation mode. The jerk is specified as an unsigned 32-bit number with units of counts/sample3. The scaling is 1/232. The range is 0 to 2,147,483,647. The loaded jerk is not utilized until a parameter update occurs.
SET_ACC Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set command acceleration 2/write 12 (hex) current axis all axes yes
SET_RATIO Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set command gear ratio 2/write 14 (hex) current axis axis #1, #2 yes
SET_ACC sets the command acceleration. When in trapezoidal pointto-point mode, the acceleration is specified as an unsigned 32-bit number with units of counts/sample2, represented using 1/216 scaling. The range is 0 to +1,073,741,823. When in the velocity contouring mode, the acceleration is specified as a signed 32-bit number with units of counts/sample2, represented in 1/216 format.The range is 1,073,741,824 to +1,073,741,823. The loaded acceleration is not utilized until a parameter update occurs. This command is used when the profile mode is set to trapezoidal point-to-point or velocity contouring.
SET_RATIO sets the electronic gear ratio used by the trajectory profile generator. It is used when the profile mode is set to electronic gear. The gear ratio is specified as a signed 32-bit number represented using 1/216 scaling. The range is -1,073,741,824 to +1,073,741,823. The specified ratio value is defined as the number of counts of the slave axis per master axis count with a positive number indicating motion in the same direction. For example a value of +8000 hex (1/2) will result in 1/2 turn in the positive direction of the slave axis for each full turn of the master axis in the positive direction, and a value of -FFFE0000 hex (-2) will result in 2 turns in the negative direction of the slave axis for each full turn of the master axis in the positive direction. The loaded ratio is not utilized until a parameter update occurs. STOP/CLR_PRFL Data/direction: Encoding: Axis acted on: Available on: Double buffered: Abruptly stop current axis motion none 46 (hex) current axis all axes yes
SET_MAX_ACC Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set maximum acceleration 1/write 15 (hex) current axis all axes yes
SET_MAX_ACC sets the maximum acceleration. The acceleration is specified as an unsigned 16-bit number with units of counts/sample2 represented using 1/216 scaling. The range is 0 to +1,073,741,823. The loaded max. acceleration is not utilized until a parameter update occurs. This command is used when the profile mode is set to S-curve point to point.
STOP, also known as CLR_PRFL in earlier chipset versions, stops the current axis by setting the target velocity to zero. This function will not be performed until a parameter update occurs. After the update occurs the axis trajectory generator will stop and the motion complete bit will be set. This command is useful for stopping the axis abruptly.
44
SMOOTH_STOP Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Smoothly stop current axis motion none 4e (hex) current axis all axes yes
GET_VEL Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get command velocity 2/read 4b (hex) current axis all axes -
SMOOTH_STOP stops the current axis by setting the desired velocity to zero, resulting in a controlled deceleration of the axis eventually to a velocity of 0. The deceleration profile will mirror the acceleration profile for the current profile mode. For example if the SMOOTH_STOP command is given during an s-curve profile the deceleration profile may have up to three phases, depending on the # of phases during the acceleration profile, and if the SMOOTH_STOP command is given during a trapezoidal profile or a velocity mode profile the deceleration will be linear, with a value equal to the acceleration parameter. This command does not function when the profile mode is set to Electronic Gear.
GET_VEL returns the maximum velocity set using the SET_VEL command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. The returned velocity is an unsigned 32-bit number in 1/216 format with units of counts/sample.
SYNCH_PRFL Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set target position equal to the actual position none 47 (hex) current axis all axes yes
GET_ACC Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get command acceleration 2/read 4c (hex) current axis all axes -
GET_ACC returns the acceleration value set using the SET_ACC command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. The returned position is either an unsigned 32-bit number in 1/216 format with units of counts/sample2, or a signed 32 bit number in 1/216 format with units of counts/sample2. This command is used when the profile mode is set to trapezoidal point-to-point or velocity contouring.
SYNCH_PRFL sets the trajectory profile generator target position equal to the actual axis position, clearing the following error. This command is available for all profile types. This function will not be performed until a parameter update occurs. The SYNCH_PRFL command does not set the target velocity to zero. If it is desired that the axis not move after a SYNCH_PRFL command then a STOP command, in addition to the SYNCH_PRFL command should be used.
GET_POS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get command position 2/read 4a (hex) current axis all axes -
GET_MAX_ACC Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get maximum acceleration 1/read 4f (hex) current axis all axes -
GET_POS returns the destination position set using the SET_POS command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. The returned position is a signed 32-bit number with units of counts.
GET_MAX_ACC returns the max. acceleration value set using the SET_MAX_ACC command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. The returned value is an unsigned 16-bit number in 1/216 format with units of counts/sample2. This command is used when the profile mode is set to S-curve point to point.
45
GET_JERK Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get command jerk 2/read 58 (hex) current axis all axes -
being output by the trajectory profile generator at the time of the command. This command operates for all profile modes. The value returned is a 32 bit signed number with units of counts/sample, represented in 1/216 format. The range is -1,073,741,824 to +1,073,741,823. This command is useful to monitor the profile being generated by the chip set, or to verify servo performance.
GET_JERK returns the jerk value set using the SET_JERK command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. The returned jerk is an unsigned 32-bit number with 1/232 scaling with units of counts/sample3.
Digital Filter
SET_KP Data/direction: Encoding: Axis acted on: Available on: Double buffered: Set proportional gain 1/write 25 (hex) current axis all axes yes
GET_RATIO Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get command gear ratio 2/read 59 (hex) current axis all axes -
SET_KP sets the proportional gain for the digital filter. The gain is specified as an unsigned 16-bit number. The range is 0 to 32,767. The loaded gain is not utilized until a parameter update occurs.
GET_RATIO returns the gear ratio set using the SET_RATIO command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the profile parameters have been updated. The returned ratio is a signed 32-bit number in 1/216 format.
SET_KD Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set derivative gain 1/write 27 (hex) current axis all axes yes
GET_TRGT_POS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Return target position 2/read 1d (hex) current axis all axes -
SET_KD sets the derivative gain for the digital filter. The gain is specified as an unsigned 16-bit number. The range is 0 to 32,767. The loaded gain is not utilized until a parameter update occurs.
GET_TRGT_POS returns the current desired position value being generated by the trajectory profile generator. This value represents the target position for the axis at the current sample time, i.e. the position being output by the trajectory profile generator at the time of the command. This command operates for all profile modes. The value returned is a 32-bit signed number with units of counts. The range is 1,073,741,824 to 1,073,741,823. This command is useful to monitor the profile being generated by the chip set, or to verify servo performance.
SET_KI Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set integral gain 1/write 26 (hex) current axis all axes yes
SET_KI sets the integral gain for the digital filter. The gain is specified as an unsigned 16-bit number. The range is 0 to 32,767. The loaded gain is not utilized until a parameter update occurs.
GET_TRGT_VEL Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Return target velocity 2/read 1e (hex) current axis all axes -
SET_KVFF Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set velocity feed forward gain 1/write 2b (hex) current axis all axes yes
GET_TRGT_VEL returns the current desired velocity value being generated by the trajectory profile generator. This value represents the target velocity for the axis at the current sample time, i.e. the velocity
SET_KVFF sets the velocity feed forward gain for the digital filter. The gain is specified as an unsigned 16 bit number. The range is 0 to 32,767. The loaded gain is not utilized until a parameter update occurs.
46
SET_I_LM Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set integration limit 1/write 28 (hex) current axis all axes yes
SET_POS_ERR Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set position error limit 1/write 29 (hex) current axis all axes no
SET_I_LM sets the integration limit for the digital filter. The integration limit is specified as an unsigned 16-bit number. The range is 0 to 32,767. The loaded integration limit is not utilized until a parameter update occurs.
SET_MTR_LMT Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set motor output limit 1/write 06 (hex) current axis all axes no
SET_POS_ERR sets the position error limit for the digital filter. The error is specified as an unsigned 16-bit number. The range is 0 to 32,767. At each servo loop the magnitude of the position error calculated by the digital filter is compared with the specified position error limit. If the actual position error exceeds the specified value, the motion error interrupt bit is set. In addition, if the axis has been set for automatic motor stop upon motion error, the axis motor output may be turned off (all power to motor is turned off). The loaded maximum position error is utilized immediately. The value set by this command specifies the limit of the valid motion error range, but not necessarily the maximum error value. If the position error limit value is set to less than 32,767 than the actual position error may exceed the specified limit.
SET_MTR_LMT sets the maximum allowed motor command value output by the servo filter. The motor limit is specified as an unsigned 16-bit number with a range of 0 to 32,767. If the magnitude of the filter output value (whether positive or negative) exceeds the motor limit than the output value is maintained at the motor limit value. Once the filter output value returns below the specified limit than normal servo filter values are output. The loaded motor output limit is utilized immediately. No UPDATE command is required. The SET_MTR_LMT command only functions during closed loop operations.
GET_KP Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get proportional gain 1/read 50 (hex) current axis all axes -
GET_KP returns the proportional gain set using the SET_KP command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the filter parameters have been updated. The returned gain value is an unsigned 16-bit number.
SET_MTR_BIAS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set motor output bias 1/write 0f (hex) current axis all axes no
SET_MTR_BIAS sets the filter DC bias value, used to offset constant uni-directional forces (typically a vertical axis which is not balanced by a counter-weight). The specified motor bias value is added directly to the output of the servo filter. The motor bias is specified as a signed 16-bit number with a range of -32,767 to 32,767. The loaded motor bias value is utilized immediately. No UPDATE command is required. The SET_MTR_BIAS command functions during closed loop operations, as well as after a transition to open loop before a SET_MTR_CMD manual motor output command has been given. Caution should be used when selecting a motor bias value to avoid uncontrolled axis motion when transitioning to open loop mode.
GET_KD Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get derivative gain 1/read 52 (hex) current axis all axes -
GET_KD returns the derivative gain set using the SET_KD command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the filter parameters have been updated. The returned gain value is an unsigned 16-bit number.
47
GET_KI Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get integral gain 1/read 51 (hex) current axis all axes -
GET_MTR_BIAS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get motor output bias 1/read 2d (hex) current axis all axes -
GET_KI returns the integral gain set using the SET_KI command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the filter parameters have been updated. The returned gain value is an unsigned 16-bit number.
GET_MTR_BIAS returns the filter DC bias value set using the SET_MTR_BIAS command. The returned value is a signed 16-bit number with a range of -32767 to 32,767.
GET_KVFF Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get velocity feedforward gain 1/read 54 (hex) current axis all axes -
GET_POS_ERR Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get maximum position error 1/read 55 (hex) current axis all axes -
GET_KVFF returns the proportional gain set using the SET_KVFF command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the filter parameters have been updated. The returned gain value is an unsigned 16-bit number.
GET_POS_ERR returns the maximum position error value set using the SET_POS_ERR command. The returned maximum position error value is an un signed 16-bit number.
GET_INTGR Data/direction: Encoding: Axis acted on: Available on: Double buffered:
GET_I_LM Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get integration limit 1/read 53 (hex) current axis all axes -
Return current integrated position error value 1/read 2e (hex) current axis all axes -
GET_I_LM returns the integration limit value set using the SET_I_LM command. It returns the double-buffered value (set directly by the host), which may or may not correspond to the active value, depending on whether the filter parameters have been updated. The returned integration limit value is an unsigned 16-bit number.
GET_INTGR returns the current integrated position error value maintained by the digital filter. The value returned represents the top 16 bit word of the 24-bit integration value. The value returned is a 16-bit signed number. The range is -32,768 to +32,767. This command is useful to monitor the loading on the axis, since increases or decreases in the axis load may be reflected in the value of the integration limit.
GET_MTR_LMT Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get motor output limit 1/read 07 (hex) current axis all axes -
GET_ACTL_POS_ERR Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Return current position error 1/read 60 (hex) current axis all axes -
GET_MTR_LMT returns the maximum allowed motor command value output by the servo filter set using the SET_MTR_LMT command. The returned value is an unsigned 16-bit number with a range of 0 to 32,767.
GET_ACTL_POS_ERR returns the current instantaneous position error of the axis. The returned value represents the difference between the target position and the actual position (actual position minus target position), and is a signed 16-bit number. The range is -32,768 to +32,767. This command is useful to monitor and analyze the tracking error of the axis.
48
SET_AUTO_STOP_ON Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Enable automatic motor shutdown none 45 (hex) current axis all axes no
After the SET_POS_BRK command is executed, at each servo loop the break point value will be compared against the current axis target position. If the target position has a value equal to or greater than the breakpoint register then all profile and all filter parameters will be loaded in to the active registers. After this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set.
SET_AUTO_STOP_ON enables automatic motor shutdown upon motion error. In this mode the motor will be disabled (equivalent to MTR_OFF cmd) when a motion error occurs (see SET_POS_ERR cmd). The motor output can be re-enabled using the MTR_ON cmd.
SET_NEG_BRK Data/direction: Encoding: Axis acted on: Available on: Double buffered:
SET_AUTO_STOP_OFF Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Disables automatic motor shutdown none 44 (hex) current axis all axes no
Set break point mode to negative target position based none 19 (hex) current axis all axes no
SET_AUTO_STOP_OFF disables the automatic motor shutdown upon motion error mode. In this mode the motor will not be disabled when a motion error occurs.
Parameter Update
SET_TIME_BRK Data/direction: Encoding: Axis acted on: Available on: Double buffered: Set break point mode to time based none 17 (hex) current axis all axes no
SET_NEG_BRK sets the current breakpoint mode to negative target position based. In this mode the value loaded into the breakpoint register (SET_BRK_PNT cmd) will represent the axis position in counts After the SET_NEG_BRK command is executed, at each servo loop the break point value will be compared against the current axis target position. If the target position has a value equal to or less than the breakpoint register then all profile and all filter parameters will be loaded into the active registers. After this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set.
SET_ACTL_POS_BRK Data/direction: Encoding: Axis acted on: Available on: Double buffered:
SET_TIME_BRK sets the current breakpoint mode to time based. In this mode the value loaded into the breakpoint register (SET_BRK_PNT cmd) will represent the number of sample loops since chip set power on. After the SET_TIME_BRK command is executed, at each servo loop the break point value will be compared against the current chip set time. If the values are equal all profile and filter parameters will be loaded in to the active registers. See GET_TIME cmd for information on the chip set time. After this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set.
Set break point mode to positive actual position based none 1b (hex) current axis all axes no
SET_ACTL_POS_BRK sets the current breakpoint mode to positive actual position based. In this mode the value loaded into the breakpoint register (SET_BRK_PNT cmd) will represent the axis position in counts. After the SET_ACTL_POS_BRK command is executed, at each servo loop the break point value will be compared against the current axis actual position. If the actual position has a value equal to or greater than the breakpoint register then all profile and all filter parameters will be loaded in to the active registers. After this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set..
SET_POS_BRK Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set break point mode to positive target position based none 18 (hex) current axis all axes no
SET_POS_BRK sets the current breakpoint mode to positive target position based. In this mode the value loaded into the breakpoint register (SET_BRK_PNT cmd) will represent the axis position in counts.
49
SET_ACTL_NEG_BRK Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set break point mode to negative actual position based none 1c (hex) current axis all axes no
parameters will be loaded in to the active registers. After this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set. No 32-bit compare value is required to be loaded when using this breakpoint mode.
SET_ACTL_NEG_BRK sets the current breakpoint mode to negative actual position based. In this mode the value loaded into the breakpoint register (SET_BRK_PNT cmd) will represent the axis position in counts After the SET_ACTL_NEG_BRK command is executed, at each servo loop the break point value will be compared against the current axis actual position. If the actual position has a value equal to or less than the breakpoint register then all profile and all filter parameters will be loaded into the active registers. After this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set.
SET_BRK_OFF Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set break point mode off none 6d (hex) current axis all axes no
SET_BRK_OFF sets the breakpoint mode to "off". Any breakpoint mode that has been set previously (SET_TIME_BRK, SET_POS_BRK, SET_NEG_BRK, SET_ACTL_POS_BRK or SET_ACTL_NEG_BRK) and is still active (the breakpoint condition has not occurred), is disabled with this command. After this command has been executed no additional breakpoints will occur until a new breakpoint condition is set.
SET_MTN_CMPLT_BRK Set break point mode to motion complete Data/direction: none Encoding: 35 (hex) Axis acted on: current axis Available on: all axes Double buffered: no SET_MTN_CMPLT_BRK sets the current breakpoint mode to motion complete. In this mode the breakpoint condition is satisfied when the motion complete bit in the axis status word becomes active (axis motion is complete). This breakpoint mode is useful for immediately starting a new profile at the end of the current profile. Once the motion complete bit becomes active all double-buffered profile parameters will be loaded in to the active registers. After this breakpoint condition has been satisfied, the breakpoint mode is reset i.e. no additional breakpoints will occur until a new breakpoint condition is set. No 32-bit compare value is required to be loaded when using this breakpoint mode. It is the responsibility of the host to ensure that the motion complete bit is not set when this breakpoint is initiated.
SET_BRK_PNT Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set break point comparison value 2/write 16 (hex) current axis all axes no
SET_BRK_PNT sets the breakpoint comparison value. Its contents are interpreted based on the type of breakpoint set; time based (SET_TIME_BRK cmd) or position based (SET_POS_BRK cmd, SET_NEG_BRK cmd, SET_POS_ACTL_BRK cmd, and SET_NEG_ACTL_BRK cmd). When set to time-based the loaded value is compared with the current chip set time at each servo loop, and the value loaded is a 32-bit number with units of servo loops. When set to position-based the loaded value is compared with the current axis target or actual position at each servo loop, and the value loaded is a 32-bit number with units of counts.
SET_EXT_BRK Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set break point mode to external none 5e (hex) current axis all axes no
UPDATE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Immediately update parameters none 1a (hex) current axis all axes no
UPDATE immediately updates all double buffered parameters.
SET_EXT_BRK sets the current breakpoint mode to external. In this mode the breakpoint condition is satisfied when the home signal for the current axis becomes active (goes low). This breakpoint mode is useful for executing a profile change based on some external signal condition. Once the home signal becomes active all double-buffered profile
50
MULTI_UPDATE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Immediately update parameters for multiple axis 1/write 5b (hex) set by data word all axes no
GET_BRK_PNT Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get break point comparison value 2/read 57 (hex) current axis all axes no
MULTI_UPDATE immediately updates the profile and filter parameters for 1 or more axis simultaneously. For each updated axis, the axis behaves as if a separate UPDATE command had been given for each axis. The associated data word contains a "positive-sense" bit mask for each axis. A one (1) in the axis bit position indicates the axis will be updated. A zero (0) indicates it will not. The following table shows this bit encoding: Bit # 0 1 2-15 Axis # updated 1 2 unused, must be set to 0
GET_BRK_PNT returns the breakpoint comparison value set using the SET_BRK_PNT command. The returned value is a 32-bit number with units of either servo loops or counts (depending on the current breakpoint mode).
Interrupt Processing
SET_INTRPT_MASK Data/direction: Encoding: Axis acted on: Available on: Double buffered: Set host interrupt mask 1/write 2f (hex) current axis all axes no
SET_AUTO_UPDATE_ON Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set automatic profile update on none 5c (hex) current all axes no
SET_AUTO_UPDATE_ON sets the automatic profile update mechanism on. After this command is sent, a satisfied breakpoint condition will result in all of the double-buffered profile and filter parameters automatically being transferred to the active registers. Once set to this mode, the axis will stay in this mode until explicitly commanded out using the SET_AUTO_UPDATE_OFF command.
SET_INTRPT_MASK sets the interrupt mask so that interrupt events can be individually masked off. When a non-masked interrupt occurs in any axis, the interrupt signal to the host is activated (HostIntrpt pin on I/O chip). The host can choose to ignore or respond to the interrupt. Once an interrupt has been generated, no new interrupts will be generated until a RST_INTRPT command is given, after which the interrupt signal to the host will be cleared, and a new interrupt (on any axis) can be generated. The associated data word is encoded as a field of bits, with each bit representing a possible interrupting condition. A 1 value in the mask bit will cause the corresponding event to generate an interrupt, while a 0 will stop the corresponding event from interrupting the host. The bit encoding is as follows: Bit # 0 1 2 3 4 5 6 7 8-10 11 12-15 Event Motion complete position wrap-around update breakpoint reached position capture received motion error positive limit switch negative limit switch command error not used, must be set to 0 commutation error not used, may be set to 0 or 1
SET_AUTO_UPDATE_OFF Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set automatic profile update off none 5d (hex) current all axes no
SET_AUTO_UPDATE_OFF sets the automatic profile update mechanism off. After this command is sent, a satisfied breakpoint condition will not result in the double-buffered profile and filter parameters automatically being transferred to the active registers. Once set to this mode, the axis will stay in this mode until explicitly commanded out using the SET_AUTO_UPDATE_ON command. When in this mode, the only way that profile parameters can be updated is through the UPDATE or the MULTI_UPDATE commands.
51
GET_INTRPT Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Return status of the interrupting axis 1/read 30 (hex) interrupting axis all axes -
GET_INTRPT_MASK Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get host interrupt mask 1/read 56 (hex) current axis all axes no
GET_INTRPT returns the status of the axis that generated a host interrupt. The current axis number will not be changed after executing this command. See GET_STATUS for a definition of the returned status word. If this command is executed when no interrupt condition is present, the status of the current axis will be returned. If this command is executed when no interrupt condition is present, the command will return the status of the current axis (same as GET_STATUS command).
GET_INTRPT_MASK returns the interrupt mask set by the SET_INTRPT_MASK command. The returned value is a bit-encoded mask, described in the SET_INTRPT_MASK command.
Status/Mode
CLR_STATUS Data/direction: Encoding: Axis acted on: Available on: Double buffered: Clear all event bit conditions none 33 (hex) current axis all axes no
RST_INTRPT Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Reset interrupting condition events 1/write 32 (hex) interrupting axis all axes no
RST_INTRPT resets (clears) the interrupt condition bits for the axis that caused a host interrupt by masking the interrupting axis status word with the specified data word. In addition, the host interrupt signal (HostIntrpt pin on I/O chip) is de-activated.The data word is encoded as a field of bits, with each bit representing a possible interrupting condition. For each status word event bit a 1 value in the specified word will cause the status bit to remain unchanged, while a 0 will reset the corresponding event. The bit encoding is as follows: Bit # 0 1 2 3 4 5 6 7 8-10 11 12-15 Event Motion complete position wrap-around breakpoint reached position capture received motion error positive limit switch negative limit switch command error not used, may be set to 0 or 1 commutation error not used, may be set to 0
CLR_STATUS resets (clears) all of the event bit conditions for the axis (bits 0-7 and 11 of the status word). The host interrupt line is not affected by this command. This command is useful for clearing all event bits during initialization, or during on-line usage if the interrupt line and associated commands are not being used. For a detailed description of the status word event bits, see the GET_STATUS command. This command does not affect the status of the host interrupt line, only the status event-bits themselves. To reset the host interrupt line, a RST_INTRPT command must be sent.
RST_STATUS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Reset specific event bit conditions 1/write 34 (hex) current axis all axes no
RST_STATUS resets (clears) the condition event bits for the current axis, using a data word mask. The data word is encoded as a field of bits, with each bit representing a possible condition event. For each status word event bit a 1 value in the specified data word will cause the status bit to remain unchanged, while a 0 will reset the corresponding event. The bit encoding is as follows: Bit # 0 1 2 3 4 5 6 7 Event Motion complete position wrap-around breakpoint reached position capture received motion error positive limit switch negative limit switch command error
If this command is executed when no interrupt condition is present, the command will have no effect.
52
8-10 11 12-15 GET_STATUS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
not used, may be set to 0 or 1 commutation error not used, may be set to 0 Get axis status word 1/read 31 (hex) current axis all axes -
11,12
13-15
Trajectory profile mode, encoded as follows: Bit 12 Bit 11 Profile Mode 0 0 trapezoidal 0 1 velocity contouring 1 0 s-curve 1 1 electronic gear Phase # (S-curve profile only). 3-bit word encodes phase #. Bit 15 is MSB, bit 13 is LSB.
Encoder
SET_CAPT_INDEX Data/direction: Encoding: Axis acted on: Available on: Double buffered: Set position capture trigger source to the index signal none 64 (hex) current axis all axes no
GET_STATUS returns the status of the current axis.The bit encoding of the returned word is as follows: Bit # 0 1 2 3 4 5 6 7 8 9 10 11 12,13 14,15 Event motion complete (1 indicates complete) position wrap-around (1 indicates wrap) update breakpoint reached (1 indicates reached) position capture received (1 indicates capture has occurred) motion error (1 indicates motion error) positive limit switch (1 indicates limit switch trip) negative limit switch (1 indicates limit switch trip) command error (1 indicates command error) motor on/off status (1 indicates on) axis on/off status (1 indicates on) In-motion bit (1 indicates axis is in motion) commutation error (1 indicates error) current axis # (13 bit = high bit, 12 bit = low bit) reserved (may be 0 or 1)
SET_CAPT_INDEX sets the high-speed position register trigger source to the index signal. When the index is used as the trigger source, it is gated by the A and B quadrature signals (see theory of operations for details).
SET_CAPT_HOME Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Bits 0-7 and 11 are set by the chipset, and must be reset by the host (using CLR_STATUS, RST_STATUS, or RST_INTRPT commands). Bits 8, 9, 10, 12, and 13 are continuously maintained by the chipset and are not set or reset by the host.
Set position capture trigger source to the home signal none 65 (hex) current axis all axes no
SET_CAPT_HOME sets the high-speed position register trigger source to the home signal.
GET_MODE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get axis mode word 1/read 48 (hex) current axis all axes -
GET_CAPT Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Return high speed capture register 2/read 36 (hex) current axis all axes -
GET_MODE returns the mode word for the axis.The bit encoding of the returned word is as follows: Bit # 0-6 7 8 9 10 Event Contains no host-useable information. Stop on motion error mode flag. 1 indicates auto stop is on. Internal use only. Contains no host-useable data Contains no host-useable information Auto update flag. 1 indicates auto update is disabled.
GET_CAPT returns the current value of the high-speed position capture register, as well as resets the capture hardware so that subsequent positions may be captured. The value returned is a 32 bit signed number with units of counts.
53
Motor
SET_OUTPUT_PWM Data/direction: Encoding: Axis acted on: Available on: Double buffered: Set motor output mode to PWM none 3c (hex) global (all axes) all axes no
SET_MTR_CMD Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Write direct value to motor output 1/write 62 (hex) current axis all axes no
SET_OUTPUT_PWM sets the motor output mode to PWM. PWM mode outputs the motor output value on 2 output signals (sign and magnitude) for each enabled axis. This command affects the output mode for all axes.
SET_MTR_CMD loads the motor command register with the specified value. This register replaces the motor command value from the servo filter when the motor is shut off (MTR_OFF command). The specified motor command is a 16-bit signed number with range -32,767 to +32,767. Regardless of the motor output mode (PWM or DAC16), a value of -32,767 represents the largest negative direction motor command, a value of 0 represents no motor (0) output command, and a value of 32,767 represents the largest positive motor command. For this command to work properly, the chipset must be in open loop mode (MTR_OFF cmd or after a motion error with automatic motor stop enabled)
SET_OUTPUT_DAC16 Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set motor output mode to 16-bit DAC none 3b (hex) global (all axes) all axes no
SET_OUTPUT_DAC16 sets the motor output mode to 16-bit DAC. This motor output mode uses a 16-bit data bus, along with various control signals to load a DAC value for each enabled axis. This command affects the output mode for all axes.
GET_MTR_CMD Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Read current motor output value 1/read 3a (hex) current axis all axes -
MTR_ON Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Enable servo motor output none 43 (hex) current axis all axes no
GET_MTR_CMD returns the current motor output command. When the chipset is in closed loop mode this command returns the output of the servo filter. When the chipset is in open loop mode this command returns the contents of the manual output register, set using the SET_MTR_CMD command.
MTR_ON enables closed loop servo control. When motor output is enabled, motor output values generated by the digital filter are output to the selected output hardware circuitry (PWM, DAC12 or DAC16).
SET_BUF_MTR_CMD Data/direction: Encoding: Axis acted on: Available on: Double buffered:
MTR_OFF Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Disable servo motor output none 42 (hex) current axis all axes no
Write double-buffered value to motor output 1/write 77 (hex) current axis 1, 2 yes
SET_BUF_MTR_CMD loads the motor command register with the specified value. It is identical to the SET_MTR_CMD except that it requires an UPDATE command for the written value to take effect.
MTR_OFF disables closed loop servo operations. After this command is executed the motor output is taken from the motor command register, set using the SET_MTR_CMD command. This register is loaded with a value of 0 at the moment the motor is disabled. This command can be used for emergency shutdowns, for calibrating the motor amplifier, or for running an axis in open loop mode.
GET_OUTPUT_MODE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get current motor output mode 1/read 6e (hex) global (all axes) all axes -
GET_OUTPUT_MODE returns the current motor output mode set using the SET_OUTPUT_PWM and SET_OUTPUT_DAC16 commands. The
54
returned 16 bit word contains the motor output mode. The encoding is as follows: Returned Word Value 0 1 2 Output Mode PWM not used DAC16
SET_ACTL_POS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set actual axis position 2/write 4d (hex) current axis all axes no
GET_BUF_MTR_CMD Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get double-buffered motor output value 1/read 69 (hex) current axis 1, 2 -
SET_ACTL_POS sets the current actual position to the specified value. In addition, it sets the current target position equal to the specified actual position minus the current actual position error. In this way the current actual position error is maintained, allowing the SET_ACTL_POS command to be used while the axis is moving without causing the servo axis to jump. The desired actual axis position is specified as a signed 32 bit number with an allowed range of 1,073,741,824 to 1,073,741,823. The loaded position is utilized immediately. No UPDATE is required for the command to take effect.
GET_BUF_MTR_CMD returns the value set using the SET_BUF_MTR_CMD. The returned value is a 16 bit integer.
Miscellaneous
AXIS_ON Data/direction: Encoding: Axis acted on: Available on: Double buffered: Enable current axis none 41 (hex) current axis all axes no
GET_ACTL_POS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Return actual axis position 2/read 37 (hex) current axis all axes -
AXIS_ON enables the current axis. Axes that are on are serviced normally. Axes that are off are not serviced, and will not support any axis features. Axes can be enabled or disabled at any time, although care should be taken not to disable an axis such that unsafe motion occurs.
GET_ACTL_POS returns the current actual position of the current axis. The value read is up to date to within a servo sample time.The value returned is a 32 bit signed number with units of counts.
AXIS_OFF Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Disable current axis none 40 (hex) current axis all axes no
SET_LMT_SENSE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set limit switch bit sense 1/write 66 (hex) global (all axes) all axes -
AXIS_OFF disables the current axis. Axis that are on are serviced normally. Axis that are off are not serviced, and will not support any axis features. Axes can be enabled or disabled at any time, although care should be taken not to disable an axis such that unsafe motion occurs.
SET_LMT_SENSE sets the interpretation of the limit switch input bits. This command provides added flexibility in interfacing to various switch/sensor components. The signal level interpretation for the positive and negative switch inputs are bit-programmable. A 0 in the corresponding bit of the sense word indicates that the input will be active high. A 1 in the sense word indicates that the input will be active low. The sense word is encoded as follows: Bit # 0 1 2 3 4-15 Description Axis 1 positive limit switch (0 = active high) Axis 1 negative limit switch (0 = active high) Axis 2 positive limit switch (0 = active high) Axis 2 negative limit switch (0 = active high) not used (must set to 0)
The above bits are encoded as shown for the MC1231A. For the MC1131A axis 2 is not used.
55
GET_LMT_SWTCH Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get state of over-travel limit switches 1/read 67 (hex) global (all axes) all axes -
GET_HOME Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get state of home signal inputs 1/read 05 (hex) global (all axes) all axes -
GET_LMT_SWTCH returns the value of the limit switch input signals for all valid axis. The returned word is encoded as follows: Bit # 0 1 2 3 4-15 Description Axis 1 positive limit switch (1 = high) Axis 1 negative limit switch (1 = high) Axis 2 positive limit switch (1 = high) Axis 2 negative limit switch (1 = high) not used (set to 0)
GET_HOME returns the value of the home signal inputs for all valid axes. The returned word is encoded as follows: Bit # 1 2-15 Description Axis 1 home signal (1 = high) Axis 2 home signal (1 = high) not used (set to 0)
The above bits are encoded as shown for the MC1231A. For the MC1131A Axis 2 will always be set to 0.
The above bits are encoded as shown for the MC1231A. For the MC1131A Axis 2 will always be set to 0. The values returned by this command are not affected by the SET_LMT_SENSE command. SET_SMPL_TIME Data/direction: Encoding: Axis acted on: Available on: Double buffered: Set servo loop sample time 1/write 38 (hex) global (all axes) all axes No
LMTS_ON Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set limit switch sensing on none 70 (hex) global (all axes) all axes -
LMTS_ON turns the limit switch sensing mechanism on. This command is primarily intended for compatibility with the MC1400 chipset, although it can also be used to re-enable limit switch sensing whenever it has been disabled using the LMTS_OFF command.
SET_SMPL_TIME sets the servo sampling time which is the amount of time between servo updates. All axes operate at the same sample rate, and therefore are all affected by this command. The written value consists of the sample time expressed in units of 135 micro-seconds. For example a written value of 4 sets the loop time to 540 uSec. The allowed range is 1 to 32,767, however see theory of operations section for guidelines on the minimum values that can be used.
LMTS_OFF Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set limit switch sensing off none 71 (hex) global (all axes) all axes -
GET_SMPL_TIME Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get servo loop sample time 1/read 61 (hex) global (all axes) all axes No
LMTS_OFF turns the limit switch sensing mechanism off. This command is primarily intended for compatibility with the MC1400 chipset, although it can also be used whenever it is desired that limit switch sensing not be active. This command only disables the automatic setting of the negative and positive limit switch bits in the status word. It does not affect the status of these bits if they have already been set, nor does it affect the GET_LMT_SWTCH command.
GET_SMPL_TIME returns the sample time set using the command SET_SMPL_TIME. The returned value is a 16 bit unsigned number with units of 135 uSecs.
56
RESET Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Reset chip set none 39 (hex) global (all axes) all axes No
GET_VRSN Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Return chipset software information 1read 6c (hex) global (all axes) all axes -
RESET resets the entire chip set. This command performs the same sequence as a hardware reset. At the end of this operation the chip set will be in the default or powerup condition, defined as follows: Condition all actual axis positions all capture registers all event conditions host interrupt (HostIntrpt) signal all interrupt masks all profile modes all filter modes all profile parameter values all filter gains all integration limits all max. position error values all brkpnt comparison values auto update all axes status' all motor status' all auto stop modes limit switch sensing limit switch sense register output mode all motor output values current axis number sample time all waveforms all initial phase offsets all # counts per comm. cycle all phase init methods all commutation modes all prescalars all phase advance gains Hall sense register all phase init durations Initial Value 0 0 cleared not active 0 trapezoidal PID 0 0 32767 32767 0 enabled (on) enabled (on) enabled (on) enabled (on) enabled (on) 0 (all active high) PWM 0 1 4 - MC1231A 2 - MC1131A 3-phase ffff (hex) 0 algorithmic encoder-based disabled 0 0 (all active high) 0
GET_VRSN returns various information on the chipset part number and software version. The encoding is as follows: Bit # 0-2 3-4 5-7 8-10 Interpretation minor software version major software version. Major software versions 2 and above indicate 'A' versions parts "dash" version # (no dash = 0, -P = 1 part number code 0 = 00 (MC1400-series), 1 = 01 (MC1401-series), 2 = 31 (MC1231-series) , 3 = 41 (MC1241-series), 4 = 51 (MC1451-series) # axes supported (0 = 1) generation # (1)
11-13 14-15
For example, the returned version code for the MC1401 (version 1.0 software) is 5908 (hex), the returned version code for the MC1201-P (version 1.0 software) is 4928, and the returned version code for the MC1231 (version 1.3 software) is 4a0b
GET_TIME Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Return current chip set time. 2/read 3e (hex) global (all axes) all axes -
GET_TIME returns the current system time, expressed as the number of servo loops since chip set power on.The chip set clock starts at 0 after a power on or reset and will count indefinitely, wrapping from a value of 4,294,967,295 to 0. The returned value is a 32 bit number with units of sample times.
Commutation
SET_PHASE_3 Data/direction: Encoding: Axis acted on: Available on: Double buffered: Set waveform to 3-phase none 73 (hex) global all no
After a reset (software or hardware) the chipset requires at least 2 milliseconds before it can accept another host I/O command
SET_PHASE_3 sets the current commutation waveform to 3-phase brushless. In this scheme the commutated output signals have a phase separation of 120 degrees.
57
SET_PHASE_2 Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set waveform mode to 2-phase none 74 (hex) global all no
during phase initialization sequence) , and the # of encoder counts per electrical cycle (provided by host). SET_PHASE_MICRO Data/direction: Encoding: Axis acted on: Available on: Double buffered: Set commutation mode to microstepping none 63 (hex) current axis all no
SET_PHASE_2 sets the current commutation waveform to 2-phase. In this scheme the commutated output signals have a phase separation of 90 degrees.
SET_PHASE_HALL Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set phase initialization to Hall-based none 78 (hex) current axis all no
SET_PHASE_MICRO sets the commutation mode to microstepping. This is not the normal operating mode of the MC1231A chipset and should only be used during phase initialization if the algorithmic or Hallbased methods can not be used.
SET_PHASE_HALL sets the phase initialization mode to Hall-based. In this mode the phasing of the motor is initialized immediately after the host sends an INIT_PHASE command by reading the state of the three Hall-sensors. Phasing is completed automatically after the motor has moved through one full rotation.
PRESCALE_ON Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set encoder prescalar on none 0d (hex) current axis all no
PRESCALE_ON enables the encoder prescalar function which reduces the rate of encoder counts used for commutation by a factor of 64. This command does not affect the actual axis position, the servo filter output, or any other encoder-related functions other than those used directly for commutation. This command should only be used when the commutation mode is encoder-based, and when the motor is not in motion.
SET_PHASE_ALGOR Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set phase initialization to algorithmic none 79 (hex) current axis all no
SET_PHASE_ALGOR sets the phase initialization mode to algorithmic. In this mode the phasing of the motor is initialized by applying energy to the windings and observing the resultant motor motion. Before the phase initialization routine can be performed the motor must be in open loop mode (MTR_OFF command). The amount of time that the chipset waits to initialize the phase after applying energy is set using the command SET_PHASE_TIME. Before phase initialization occurs the amount of energy to apply to the motor is set using the command SET_BUF_MTR_CMD. To actually begin the algorithmic initialization procedure the command INIT_PHASE is used.
PRESCALE_OFF Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set encoder prescalar off none 0e (hex) current axis all no
PRESCALE_OFF disables the encoder prescalar function which reduces the rate of encoder counts used for commutation by a factor of 64.
SET_PHASE_ENC Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set commutation mode to encoderbased none 5f (hex) current axis all no
SET_PHASE_CNTS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set number of encoder counts per commutation cycle 1/write 75 (hex) current axis all no
SET_PHASE_ENC sets the commutation mode to encoder-based. This is the normal operating mode of the MC1231A chipset. In this mode the commutation angle is determined by the encoder location (maintained continuously by chipset) , the initial phase offset value (determined
SET_PHASE_CNTS sets the number of encoder counts per commutation electrical cycle. The associated data word is an unsigned 16 bit number, with an allowed range of 129 to 32,767.
58
The minimum allowed value for this parameter is 129 (decimal).
SET_PHASE_TIME Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set amount of time to wait after phase initialization 1/write 72 (hex) current axis all no
SET_HALL_SENSE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set Hall-sensor logic level interpretation 1/write 23 (hex) current axis all no
SET_PHASE_TIME sets the amount of time to wait after the INIT_PHASE command has been given. This command is not used if the initialization method is Hall-based. The value specified is in units of sample times. The associated data word is an unsigned 16 bit number, with an allowed range of 1 to 32,767.
SET_HALL_SENSE sets the interpretation of the Hall-sensor input bits. This command provides added flexibility in interfacing to various Hallsensor components. The signal level interpretation is bit-programmable. A 0 in the corresponding bit of the sense word indicates that the input will be active high. A 1 in the sense word indicates that the input will be active low. The sense word is encoded as follows: Bit # 0 1 2 3 4 5 6-15 Description Hall Sensor 1A (0 = active high) Hall Sensor 1B (0 = active high) Hall Sensor 1C (0 = active high) Hall Sensor 2A (0 = active high) Hall Sensor 2B (0 = active high) Hall Sensor 2C (0 = active high) not used (must set to 0)
SET_PHASE_OFFSET Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set phase offset value 1/write 76 (hex) current axis all no
SET_PHASE_OFFSET sets the phase offset angle used to maintain proper motor commutation. The value specified is in units of encoder counts, and represents the offset from the index mark (in encoder counts) to the phase A maximum output value (cosine of angle 0). The associated data word is an unsigned 16 bit number, with an allowed range of 1 to 32,767. This parameter can be changed on the fly if desired. This command will not function if index pulses are not used. In addition this command will not take affect until an index pulse is received from the motor.
The above bits are encoded as shown for the MC1231A. For the MC1131A axis 2 inputs are not used.
SET_PHASE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set current commutation phase angle 1/write 84 (hex) current axis all -
SET_KPHASE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Set velocity phase advance gain 1/write 1f (hex) current axis all no
SET_PHASE sets the current instantaneous commutation angle. It should generally only be used when the motor is stationary. The value specified has an allowed range of 0 to the # of encoder counts per electrical cycle (set using SET_PHASE_CNTS command). The SET_PHASE command causes the 'phasing not initialized' flag in the phase info word (GET_PHASE_INFO command) to be set false (0), indicating phasing has been initialized.
SET_KPHASE sets velocity phase advance gain. The value specified has an allowed range of 0 to 32,767. This parameter can be changed on the fly if desired.
INIT_PHASE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Perform phase initialization procedure. 0 7a (hex) current axis all no
INIT_PHASE performs the phase initialization procedure. This command is used with both initialization methods; Hall-based (SET_PHASE_HALL command), and algorithmic (SET_PHASE_ALGOR command). When used with the Hall-based method this command will not result in any motor motion. When used with the algorithmic method this command will result in the motor
59
rapidly moving a short distance, with the final location being stored after a delay time set using the SET_PHASE_TIME command. When used in the algorithmic initialization mode before this command is given a double-buffered motor command value must be specified (SET_BUF_MTR_CMD command), an initialization duration must be specified (SET_PHASE_TIME command), and the motor must be turned off (MTR_OFF command). After executing this command the motor may jump suddenly. Precautions should be taken to avoid damage.
GET_PHASE_TIME Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get amount of time to wait after phase init 1/read 7c (hex) current axis all -
GET_PHASE_TIME returns the amount of time that the chipset will wait during phase initialization set using the SET_PHASE_TIME command. The returned word has units of sample times and is an unsigned 16 bit number.
GET_PHASE_INFO Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get commutation flags set by host. 1/read 7f (hex) current axis all -
GET_PHASE_OFFSET Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get phase offset value 1/read 7b (hex) current axis all -
GET_PHASE_INFO returns the state of various commutation-related flags maintained by the chipset. The returned word is a 16-bit word encoded as follows: Bit # 0 1 2 3 4-6 7 8 9 10-15 Interpretation phase initialization mode (0 = Algorithmic, 1 = Hall-based) used internally by chipset commutation mode. (1 = microstepping, 0 = encoder-based) waveform (0 = 3-phase, 1 = 2-phase) used internally by chipset prescalar status (0 = off, 1 = on) phasing not initialized flag. (1 = not initialized, 0 = initialized) used internally by chipset unused
GET_PHASE_OFFSET returns the phase offset value determined using the INIT_PHASE command, or set explicitly using the SET_PHASE_OFFSET command. A value of ffff (hex) in this register indicates that phase initialization has not been completed, or that the first index pulse has not yet been received. The returned value is a 16 bit integer with a range of 0 to 32,767.
GET_KPHASE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get velocity phase advance gain 1/read 20 (hex) current axis all -
GET_KPHASE returns the velocity phase advance gain set using the SET_KPHASE command. The returned value is a 16-bit integer with a range of 0 to 32,767.
GET_PHASE_CNTS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get number of encoder counts per commutation cycle 1/read 7d (hex) current axis all -
GET_HALL_SENSE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
GET_PHASE_CNTS returns the number of encoder counts per commutation electrical cycle set using the SET_PHASE_CNTS command. The returned value is in units of encoder counts, and is an unsigned 16 bit number.
Get the Hall-sensor logic level interpretation 1/read 24 (hex) current axis all -
GET_HALL_SENSE returns the Hall-sensor logic level interpretation value. The returned value is a 16-bit integer encoded as described in the SET_HALL_SENSE command.
60
GET_HALLS Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get state of Hall sensors 1/read 7e (hex) global all -
GET_HALLS returns the state of the hall sensors input into the chipset. The returned word is encoded as follows: Bit # 0 1 2 3 4 5 Interpretation Hall sensor 1A (0 = low) Hall sensor 1B (0 = low) Hall sensor 1C (0 = low) Hall sensor 2A (0 = low) Hall sensor 2B (0 = low) Hall sensor 2C (0 = low)
GET_PHASE Data/direction: Encoding: Axis acted on: Available on: Double buffered:
Get current commutation phase angle 1/read 2c (hex) current axis all -
GET_PHASE returns the current commutation phase angle, expressed as the # of encoder counts past the max. value of phase A (cosine of angle 0). The returned value is a 16-bit integer with a range of 0 to 32,767. This command can be useful for diagnostic purposes, as well as for amplifier calibration.
61
Application Notes
Interfacing MC1231A to ISA bus.
A complete, ready-to-use ISA (PC/AT) bus interface circuit has been provided to illustrate MC1231A host interfacing, as well as to make it easier for the customer to build an MC1231A-based system. The interface between the PMD MC1231A chip set and the ISA (PCAT) Bus is shown on the following page.
Comments on Schematic This interface uses a 22V10 PAL and a 74LS245 to buffer the data lines.This interface assumes a base address is assigned in the address space of A9-A0. 300-400 hex These addresses are generally available for prototyping and other system-specific uses without interfering with system assignments. This interface occupies 16 addresses from XX0 to XXF hex though it does not use all the addresses. Two select lines are provided allowing the base address to be set to 340,350,370 and 390 hex for the select lines S1,S0 equal to 0,1,2,and 3 respectively.The address assignments used are as follows, where BADR is the base address, 340 hex for example: Address 340h 342h 344h 348h use read-write data write command read status (HostRdy) [D7 only] write reset [Data= don't care]
The base address (BADR) is decoded in ADRDEC. It is nanded with SA2:SA3, BADR+0, (B+0) to form -HSEL to select the I/O chip. B+0 nanded with IOR* forms -HRD, host read, directly. The 22V10 tail-bites the write pulse since the setup time is greater than necessary on the bus some of the bus duration is used to generate data hold time at the I/O chip. -HWR, host write is set the first clock after B+0 and IOW* is recognized. The next clock sets TOG and clears -HWR. TOG remains set holding -HWR clear until IOW* is unasserted on the bus indicating the end of the bus cycle. B+4 and IOR* out enables HRDY to SD7 so the status of HRDY may be tested. SD7 is used since the sign bit of a byte may be easily tested. The rest of the data bits are left floating and should be ignored. B+8 and IOW* generate a reset pulse which will init the interface by clearing the two write registers and outputs a reset pulse, -RS, for the CP chip. The reset instruction is OR'd with RESET on the bus to initialize the PMD chip set when the PC is reset.
62
63
PWM Motor Interface
The following schematic shows a typical interface circuit between the MC1231A and an amplifier used in PWM output mode. The SGSL6234 from SGS-Thompson is an integrated package which provides 3 half-bridge amplifiers on a single chip. It can drive up to 2 Amps continuous at 52 Volts. Other integrated 3-phase drivers that are compatible with the PMD chipset's sinusoidal output are available from other vendors. Call PMD for details.
64
65
16-bit Parallel DAC Interface
The Interface between the MC1231A chip set and one or more 16 bit DACs is shown in the following figure.
Comments on Schematic The 16 Data bits and 2 address bits from the CP chip are latched in the two 74FCT841 latches when the CP writes to address F hex, in the address bits A0:A3. Three 74C373 latches could also be used. If this is a write to the DAC, DACSLCT will be asserted during this CP bus cycle. The assertion of DACSLCT will be latched by the fed-back and-or gate and the next clock will set the DACWR flop. The second clock will set the second shift flop which will clear the DACL latch. Since this latch has been cleared the third clock will clear DACWR providing a two clock DACWR level. The fourth clock will clear the second shift flop returning the system to its original state waiting for the next DACSLCT. The DACWR assertion will enable the decoder causing the DAC selected by the address bits stored in the transparent latch. The timing described will produce a two clock write pulse to the DACs. This will be about 320 nSec using I/OClk.
66
67
NOTES
68
NOTES
69
Internal Block Diagram
Incremental Encoder
Index Home
1/a 1/a
Motor Output
A PWM sign
1/a 1/phase
B
1/a
DAC address
2 16
DAC, PWM signal generator (6
I/O Chip
Quadrature decoder counter (2) Index capture register (2) Host I/O controller
5 8 1
CP Chip
Position register (2)
Commutation Generator (2) Digital Servo filtering (2) Trajectory profile generator
System Registers (2)
Host command
1/a 1/a
PosLimit Control Data host interrupt
NegLimit
Technical Specifications
Available Configurations: Operating Modes: Position Range: Velocity Range: Acceleration Range: Jerk Range: Trajectory Profile Generator Modes: 2 axes with internal sinusoidal commutation (MC1231A) 1 axis with internal sinusoidal commutation (MC1131A) Closed Loop (uses trajectory generator, servo loop, and commutation) Open loop (uses commutation only) -1,073,741,824 to 1,073,741,823 counts -16,384 to 16,383 counts/sample with a resolution of 1/65,536 counts/sample S-curve profile: -1/2 to 1/2 counts/sample^2 with a resolution of 1/65,536 counts/sample^2 All other profiles: -16,384 to 16,383 counts/sample^2 with a resolution of 1/65,536 counts/sample^2 -1/2 to 1/2 counts/sample^3, with a resolution of 1/4,294,967,296 counts/sample^3 S-curve (host commands final position, maximum velocity, maximum acceleration, and jerk) Trapezoidal (host commands final position, maximum velocity, and acceleration) Velocity contouring (host commands maximum velocity, acceleration) Electronic Gear (Encoder position of one axis is used as position command for another axis). 32768:1 to 1:32768 (negative and positive direction) PID+Vff (Proportional, Integral, Derivative + Velocity Feedforward and DC Offset) PWM (10 bits resolution @ 24.5 Khz) DAC (16 bits) Sinusoidal PWM : 2 for 2-phase motors, 3 for 3-phase motors DAC16: 2 for both 2-phase and 3-phase motors 15 kHz 1.75 Megacounts/sec. 270 uSec minimum, 4,423 mSec maximum 270 uSec per enabled axis 2 (one for each direction of travel) 160 nSec Index signal (quadrature A and B must be low) Home signal 116
Electronic Gear Ratio Range: Digital Filter Modes: Motor Output Formats: Commutation Waveform: # of Output Phases per axis: Commutation Rate: Max. Encoder Rate: Servo Loop Rate Range: Max. Servo Loop Rate: # of Limit Switches Per Axis: Hardware Position Capture Latency: Hardware Position Capture Triggers: # of Host Commands:
Chipset
Ordering Information
31A
Custom chipset versions also available. Call PMD
Chipset Developer's Kit
p/n: MC1
p/n: DK1231A*
*(Supports MC1231A and MC1131A)
2 - 2 axis 1 - 1 axis
Performance Motion Devices, Inc. 12 Waltham St. Lexington, MA 02421 tel: 781.674.9860 fax: 781.674.9861 www.pmdcorp.com


▲Up To Search▲   

 
Price & Availability of MC1231A

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X